Can't debug async http calls in typescript files on Ubuntu 18.04
See original GitHub issueHi, I don’t know if I raise this issue at the correct repo… Please, let me know if I’m at the wrong place.
Describe the bug Since the last vscode update (1.47), debugger breakpoints (in .ts files) are only hit when I start my web-server, but are not when handling http calls with express.
To Reproduce
- start my web server with
F5
in vscode. - Put a breakpoint in index.ts and observe the breakpoint being hit.
- In api.ts add a console.log(“Hey what’s up I’m a console log please notify I exist”)
- In the same file, put a breakpoint on the new console.log you’ve just added.
- Observe the console log occuring, but the breakpoint never being hit (instead being greyed out…)
- In api.js (the compiled js file of api.ts), put a breakpoint on the exact same line and observe the breakpoint being hit.
The api.ts looks something like this:
router.post('/export', async (req, res) => {
console.log("Hey what's up I'm a console log please notify I exist")
res.sendStatus(200)
})
router is an instance of Router
which wa simported from express
I believe.
Log File
I added "trace": true
to my launch.json
but nothing seems to appear in the debug console… Please let me know if I can provide any other info.
VS Code Version: 1.47
Additional context I’m using Ubuntu 18.04
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
How To Handle Async Data Loading, Lazy Loading, and Code ...
In this tutorial, you'll handle asynchronous data in React by creating an app that displays information on rivers and simulates requests to Web ......
Read more >Debug Node.js Async/Await with Typescript+VSCode
I add "smartStep": true to launch.json and debugging the await/async pattern works as desired (using Node v8.4.0). This is my launch.json:
Read more >Node.js Event-Loop: How even quick Node.js async functions ...
First, let's block the Node.js Event-Loop! Note: Examples below use Node 10.9.0 on an Ubuntu 18.04 VM with 4 cores, running on a ......
Read more >TypeScript debugging with Visual Studio Code
TypeScript debugging supports JavaScript source maps. To generate source maps for your TypeScript files, compile with the --sourcemap option or set the ...
Read more >Spring Boot Reference Documentation
It tells Spring that any HTTP request with the / path should be mapped to the ... It is also possible to run...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, it works on the nightly build!! Thanks @connor4312 ! 😄
Closing this for the moment, feel free to ping me to reopen if you continue to have issues.