I have the following configuration in my launch.json file
{
"type": "node",
"request": "launch",
"name": "Server - Current File",
"program": "${file}",
"cwd": "${workspaceFolder}/server",
"runtimeExecutable": "tsx",
"outputCapture": "std",
"env": {
"NODE_ENV": "development"
}
},
I am using it to run files from my src folder using tsx without running a full build.
The problem is if a build folder exist it will run the file from the build folder instead of running the src folder version.
└── server/
├── src/
│ └── file.ts
└── build/
└── file.js
If my open file is the src/file.ts, running the following launch.json config will run the build/file.js instead. But if I delete the build folder, then it will run the src/file.ts correctly.
srcfolder and it still runs the one inbuildfolderbuild/file.js"program": "${workspaceFolder}/server/src/file.tsx"