node.js - Cannot Launch and Debug TypeScript Using Node -
we're setting new osx machine , getting message when trying launch , debug typescript based node app:
cannot launch program '/projects/is/0.0.34/server/server/server.ts'; setting 'outdir or outfiles' attribute might help.
we've been using same launch config on year , we're not writing output separate directory, there should no need set 'outfiles'. program runs fine command prompt. however, trying launch app in vscode returning error above. did upgraded node v8.5.0 v7.3.0. based on docs should still work. other posts regarding issue relate issues resulting writing source (and sourcemaps) different directory.
launch.json
{ "configurations": [ { "name": "launch program", "type": "node", "request": "launch", "program": "${workspaceroot}/server/server.ts", "cwd": "${workspaceroot}" } ] }
here's tsconfig:
{ "compileroptions": { "target": "es5", "module": "commonjs", "sourcemap": true, "watch": true, "allowunreachablecode": true, "noimplicitusestrict": true } }
the "outfiles" setting appears required node + typescript project using vscode. added launch.json , working.
"outfiles": [ "${workspaceroot}/**/*.js" ]
Comments
Post a Comment