-
Notifications
You must be signed in to change notification settings - Fork 29k
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
VSCode JavaScript Debugger is not binding breakpoints nor printing console logs #132806
Comments
/duplicate microsoft/vscode-js-debug#1100 Please see my comment there for a resolution |
Hello, I just tried the steps in that issue, but it is still not working. Remember this is not specific to ts, because it is also happening in a javascript project. this is the launch file I use in the js project: {
"name": "Launch Program",
"program": "${workspaceFolder}/local/server.js",
"request": "launch",
"skipFiles": [
"<node_internals>/**"
],
"type": "pwa-node"
}, Just tried the nightly build of the debugger but no luck so far. |
/jsDebugLogs |
vscode-debugadapter-f1af0f8b.json.gz These are the logs for the js project. |
I just noticed I have the nightly build enabled, following logs are for the stable extension: |
Thanks for the logs. What happens if you |
Funny thing I don't see any logs in the debug console (this is part of the issue), is there any other way to test this? |
if this is of any use, this is the output when running the app directly from the console.
JavaScript Debug Terminal
|
I'm having a similar problem but for me it seems that the debugger is just very slow to start. I'm running my tests in debug mode with this config
But my tests usually end before the debugger understand that I have breakpoints set. Adding EDIT: Actually even 5 seconds isn't always sufficient. |
Slow to start is an entirely separate issue. Usually this means you have a large workspace and can tune the necessary scanning by configuring your |
Ah indeed this worked. I had assumed it was a bug since I didn't have this problem with the previous debugger but I should have digged deeper. Thanks for the tips ! |
I just updated vscode to version 1.61. Same results. I also tried a fresh vscode install but no luck. This config from jest site does not work either: {
"version": "0.2.0",
"configurations": [
{
"name": "Debug Jest Tests",
"type": "node",
"request": "launch",
"runtimeArgs": [
"--inspect-brk",
"${workspaceRoot}/node_modules/.bin/jest",
"--runInBand"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"port": 9229
}
]
} |
I was able to get it working again. Based on microsoft/vscode-js-debug#931 I set the default alias in nvm to the latest node 14 version (14.18.1 in my case) and it worked again after a VSCode reset. the only issue I have right now is that the debugger is not skipping node_modules files, it is stopping on files in there when I have {
"name": "Lauch Local Server",
"type": "pwa-node",
"request": "launch",
"runtimeExecutable": "node",
"runtimeArgs": [
"--nolazy",
"-r",
"ts-node/register/transpile-only"
],
"args": [
"local/server.ts"
],
"cwd": "${workspaceRoot}",
"internalConsoleOptions": "openOnSessionStart",
"skipFiles": [
"<node_internals>/**",
"node_modules/**"
]
} |
Oh, that could cause it. Do you know which Node version you were on before? Node 8 and certain minor 10.x versions have some known issues. Please grab one more trace for the exception issue if you can 🙂 |
I was using v14.15.5 before but my default alias was pointing to v14, now I set it to 14.18.1. I just tried to switch back to v14.15.5 and the issue came back. Do you want me to use |
Hm, thanks. While I can't repro installing the same version of my Windows machine, that would seem to indicate something off in either Node or nvm rather than the debugger. Please let me know if you run into it again. |
Issue Type: Bug
Since the last update where the old debuggers were removed from VS Code, I'm not able to get the new debugger working on my projects. I tried both a JS project and a TS project. The script runs (I'm able to send requests and get responses as usual) but all breakpoints say "unbound breakpoint" and I don't see any of the console logs that should normally be there.
I tried to create a new launch configuration from the templates but I got the same result.
This is the config I'm using for typescript:
I also tried to run the debugger with the
Run Script
option but I get this error message:Configuration 'Run Script: dev' is missing in 'launch.json'.
Before the update, this launch configuration worked without issues if I had the new debugger disabled.
VS Code version: Code 1.60.0 (e7d7e9a, 2021-09-01T10:41:52.311Z)
OS version: Windows_NT x64 10.0.19042
Restricted Mode: No
Remote OS version: Linux x64 5.10.16.3-microsoft-standard-WSL2
System Info
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Extensions (7)
A/B Experiments
The text was updated successfully, but these errors were encountered: