You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a node app written in TypeScript, launched with node.
I've set up Debugging as per the docs, and it works perfectly for non-async functions. I can step over, step into, step out etc.
However, this changes when I go into an async function. "Step over" takes me to the compiled javascript. To work around this I have to set multiple breakpoints to run my code line by line.
VSCode Version: 1.12.1
OS Version: Linux
Steps to Reproduce:
Set up debugging for a node TypeScript project
Create an async function and set a breakpoint.
Step over. Also try Stepping into function calls.
test code (test.ts):
class Test {
test(): any {
//debugging, step over/step into will work fine in this method
let a = 'b';
let b = 'c';
this.testa();
}
async testa(): any {
let a = 'b';
let b = 'c';
await this.testb(); //Try step into/step over here
let c = 'd';
return new Promise<void>(function(resolve) {
});
}
async testb(): Promise<any> {
let a = 'b';
let b = 'c';
return new Promise<void>(function(resolve) {
});
}
}
let test = new Test();
test.test();
The text was updated successfully, but these errors were encountered:
weinand
added
debug
Debug viewlet, configurations, breakpoints, adapter issues
*question
Issue represents a question, should be posted to StackOverflow (VS Code)
labels
May 13, 2017
I have a node app written in TypeScript, launched with node.
I've set up Debugging as per the docs, and it works perfectly for non-async functions. I can step over, step into, step out etc.
However, this changes when I go into an async function. "Step over" takes me to the compiled javascript. To work around this I have to set multiple breakpoints to run my code line by line.
Steps to Reproduce:
test code (test.ts):
The text was updated successfully, but these errors were encountered: