According to the documentation, it is possible to launch a program before debugging:
To launch a task before the start of each debug session, set the
FWIW, I'm using VS Code 1.20.1 and here's how I got my preLaunchTask to work:
In launch.json:
launch.json
{ "version": "0.2.0", "configurations": [ { "type": "node", "request": "launch", ... "preLaunchTask": "npm: build", } ] }
In my package.json:
package.json
{ ... "scripts": { "build": "tsc" ... } }