Closed
Description
- VSCode Version: 0.10.11
- OS Version: Windows 10
- Node Version: 4.2.2
- TypeScirpt Version:
Steps to Reproduce:
- Set a break point on a line of TypeScript code in an async function that uses the await keyword on the Promise result of another async function. Example:
const result = await callMyApi()
. - Start debugging in VS Code by selecting a related launch profile in a TypScript project. See my example snippet below.
- Run necessary code so that the debugger is stopped on the breakpoint from step 1.
- Press F11 to step into the
callMyApi
function.
Expected Result:
The .ts TypeScript file where callMyApi implementation exists should be opened and the debugger should be stopped on the first line of that function.
Actual Result:
The .js transpiled JavaScript file is opened and the debugger is stopped on the first line of the that file.
/// launch.json snippet
{
"name": "Test",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"stopOnEntry": false,
"args": [
"./bin/test/my.test.js"
],
"cwd": "${workspaceRoot}",
"runtimeExecutable": null,
"runtimeArgs": [
"--lazy",
"--harmony", "--harmony_modules","--harmony_destructuring"
],
"env": {
"NODE_ENV": "development"
},
"externalConsole": false,
"sourceMaps": true,
"outDir": "${workspaceRoot}/bin"
}
// tsconfig.json compiler options snippet
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"sourceMap": true,
"allowJs": true,
"outDir": "bin"
}
// excludes ...
}