-
Notifications
You must be signed in to change notification settings - Fork 29.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debugger doesn't properly catch execution in TypeScript #150036
Comments
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.67.2. Please try upgrading to the latest version and checking whether this issue remains. Happy Coding! |
What language or debug extension are you using? Please file this on the repo for the debug extension |
Thanks for the quick answer! I'm using TypeScript and I'm debugging using the embedded debugger. I think I omitted an important piece (I've just edited): Environment info
{
"version": "0.2.0",
"configurations": [
{
"name": "Docker: Attach to Node",
"type": "node",
"request": "attach",
"restart": true,
"remoteRoot": "/app",
"localRoot": "${workspaceFolder}/backend-clapy"
}
]
} Should I file it here: https://github.com/microsoft/vscode-remote-release ? |
I added a screenshot above to illustrate the breakpoint thing. I also tried to reinstall VSCode + Docker, no luck :( I don't know what else I can try to get back to a working debugging environment. |
Update: when I run the nodejs app in WSL2 directly (not inside a docker container), the debugger works as expected. I use it as a workaround now. Another tip, just in case: the docker container debugging works from WebStorm (although they have another issue with their config, I assume unrelated). |
Not sure what's going on, but @connor4312 will need a log. From vscode-js-debug repo:
|
Thanks! I've just sent 2 log files to Connor by email. Each log is on a different docker image, cf below. It's super weird, now the debugging works almost well: the breakpoints are caught and the UI shows all the line highlights and other stuff... What I did today: I tried another docker image to run the node app (node 16-alpine instead of 14-slim), but I have restored the previous version (altough maybe more up-to-date) and I have the new behavior (debug in JS) in both cases. No other idea. In the meanwhile, I work with node running outside docker containers, as mentioned previously. The debugging works well there. |
Back from vacation 👋 And thanks for the logs. It looks like in both the log files you sent, the If the remoteRoot is configured like it says it the comments, then it'll expect the compiled file to locally be at |
Hey @connor4312 , hope you enjoyed your vacation! Well, it seems the issue is now resolved, I have the debugging interface as it was back in the time :) Either I did something wrong I couldn't identify (and I fixed it, no idea how), or something was fixed somewhere in the background. I confirm the config from my tests 3 weeks ago included the But for the logs I've sent, they were probably missing the For the initial issue, all good on my side. Should I close this issue? |
Cool, thanks for confirming! It sounds like this was just some confusion of the launch configs, so I'll go ahead and close this. If you run into further problems, do not hesitate to open issues 🙂 |
Issue Type: Bug
When:
I started noticing the issue today. It has likely started today or in the past few days.
The only noticeable actions are VSCode and docker updates that have been installed recently. I can't relate it to any other event (no change in the dev env, stack, tooling...)
What:
Screenshot illustrating those:
The breakpoint was skipped. In this screenshot, the execution is paused on the
debugger
instruction (I can check it with the variables panel). No highlight and "Unknown Source" in the stacktrace.The line number in the stack trace matches the JS file, not the TS file.
What I tried:
Maybe it's related to a plugin (core or external) update? But I have no idea how to downgrade them, so I couldn't check.
Environment info
nest start --watch --debug 0.0.0.0:9229
When running the node app in WSL2 directly (not inside a docker container), it works as expected.
VS Code version: Code 1.67.0 (57fd6d0, 2022-05-04T12:06:02.889Z)
OS version: Windows_NT x64 10.0.19044
Restricted Mode: No
Remote OS version: Linux x64 5.10.60.1-microsoft-standard-WSL2
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Extensions (20)
A/B Experiments
The text was updated successfully, but these errors were encountered: