Skip to content
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

Cannot debug #235038

Closed
bholemaharaj opened this issue Dec 2, 2024 · 7 comments
Closed

Cannot debug #235038

bholemaharaj opened this issue Dec 2, 2024 · 7 comments
Assignees
Labels
upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@bholemaharaj
Copy link

Type: Bug

I am not sure which extension is causing this but when I started VS Code today and when I choose Javascript Debug Terminal, the breakpoints are not hit. I have tried everything to troubleshoot including re-installing VS Code.

VS Code version: Code 1.95.3 (f1a4fb1, 2024-11-13T14:50:04.152Z)
OS version: Windows_NT x64 10.0.22631
Modes:

System Info
Item Value
CPUs 12th Gen Intel(R) Core(TM) i7-12800H (20 x 2803)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 31.68GB (5.86GB free)
Process Argv --crash-reporter-id 331df767-c301-486a-a0e8-24372e326586
Screen Reader no
VM 0%
Extensions (95)
Extension Author (truncated) Version
vscode-openapi 42C 4.30.0
terraform 4op 0.2.5
better-comments aar 3.0.2
aws-toolkit-vscode ama 3.36.0
beardedicons Bea 1.18.0
npm-intellisense chr 1.4.5
vscode-redis-client cwe 7.7.2
vscode-markdownlint Dav 0.57.0
vscode-eslint dba 3.0.10
docs-article-templates doc 1.0.7
docs-images doc 1.0.4
docs-markdown doc 1.0.11
docs-preview doc 1.0.9
docs-yaml doc 1.0.5
EditorConfig Edi 0.16.4
vscode-great-icons emm 2.1.111
prettier-vscode esb 11.0.0
file-icons fil 1.1.0
code-runner for 0.12.2
codespaces Git 1.17.3
copilot Git 1.246.0
copilot-chat Git 0.22.4
remotehub Git 0.64.0
vscode-graphql-syntax Gra 1.3.8
terraform has 2.34.0
vscode-drawio hed 1.6.6
rest-client hum 0.25.1
jenkinsfile-support ivo 1.1.0
Angular2 joh 18.0.2
vscode-peacock joh 4.2.2
vscode-cfn-lint kdd 0.26.0
rainbow-csv mec 3.13.0
fluent-icons mig 0.0.19
prettify-json moh 0.0.3
mongodb-vscode mon 1.10.0
vscode-azureresourcegroups ms- 0.9.9
vscode-cosmosdb ms- 0.24.0
vscode-docker ms- 1.29.3
csdevkit ms- 1.13.9
csharp ms- 2.55.29
dotnet-interactive-vscode ms- 1.0.5568010
vscode-dotnet-runtime ms- 2.2.3
vscodeintellicode-csharp ms- 2.2.3
vscode-edge-devtools ms- 2.1.6
vscode-kubernetes-tools ms- 1.3.18
debugpy ms- 2024.12.0
isort ms- 2023.10.1
python ms- 2024.20.0
vscode-pylance ms- 2024.11.3
jupyter ms- 2024.10.0
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.0.21
vscode-jupyter-cell-tags ms- 0.1.9
vscode-jupyter-slideshow ms- 0.1.6
remote-containers ms- 0.388.0
remote-ssh ms- 0.115.1
remote-ssh-edit ms- 0.87.0
remote-wsl ms- 0.88.5
vscode-remote-extensionpack ms- 0.26.0
atom-keybindings ms- 3.3.0
azure-account ms- 0.12.0
azure-repos ms- 0.40.0
notepadplusplus-keybindings ms- 1.0.7
powershell ms- 2024.5.1
remote-explorer ms- 0.4.3
remote-repositories ms- 0.42.0
remote-server ms- 1.5.2
vs-keybindings ms- 0.2.1
vscode-typescript-next ms- 5.8.20241201
vscode-react-native msj 1.13.0
vscode-json-editor nic 0.3.0
angular-console nrw 18.31.1
vscode-jest Ort 6.4.0
material-icon-theme PKi 5.14.1
java red 1.37.0
vscode-commons red 0.0.6
vscode-yaml red 1.15.0
LiveServer rit 5.7.9
sonarlint-vscode Son 4.12.0
code-spell-checker str 4.0.21
pdf tom 1.2.2
vscode-mdx uni 1.8.11
intellicode-api-usage-examples Vis 0.2.9
vscodeintellicode Vis 1.3.2
vscode-gradle vsc 3.16.4
vscode-java-debug vsc 0.58.1
vscode-java-dependency vsc 0.24.1
vscode-java-pack vsc 0.29.0
vscode-maven vsc 0.44.0
vscode-icons vsc 12.9.0
JavaScriptSnippets xab 1.8.0
vscode-mdx-preview xyc 0.3.3
markdown-all-in-one yzh 3.6.2
material-theme zhu 3.17.6
html-css-class-completion Zig 1.20.0

(6 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
pythonnoceb:30805159
asynctok:30898717
pythonmypyd1:30879173
2e7ec940:31000449
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
dvdeprecation:31068756
dwnewjupytercf:31046870
nativerepl2:31139839
pythonrstrctxt:31112756
nativeloc1:31192215
cf971741:31144450
iacca1:31171482
notype1cf:31157160
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31184530

<! -- generated by issue reporter -->

@bholemaharaj
Copy link
Author

I have re-installed VS Code using VSCodeUserSetup-x64-1.95.3.exe, also renamed the extensions folder so I would have no extensions installed. Then, I installed JavaScript Debugger (Nightly) extension. Still, no break points are being hit.

@bholemaharaj
Copy link
Author

Ok now I am hitting the break points but, here is what I had to do and not sure why since I never had to do it before.
Now besides using JavaScript Debug Terminal, I had to also use Debug: Attach to Node Process and attach a process from the list which I never had to do before. I also have following set in my settings.json file

"debug.javascript.terminalOptions": { "trace": true }
the output of that is


> npm run start-server
> runtime.launch Bootloader imported {
>   env: {
>     inspectorIpc: '\\\\.\\pipe\\node-cdp.23460-e80dd6e7-2.sock',
>     deferredMode: false,
>     waitForDebugger: '',
>     execPath: 'C:\\Program Files\\nodejs\\node.exe',
>     onlyEntrypoint: false,
>     verbose: true,
>     autoAttachMode: 'always',
>     fileCallback: 'C:\\Users\\<username>\\AppData\\Local\\Temp\\node-debug-callback-fd6c688d632c0f6b'
>   },
>   args: [
>     'C:\\Program Files\\nodejs\\node.exe',
>     'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
>     'run',
>     'start-server'
>   ]
> }
> runtime Set debug mode { mode: 2 }
> 
> > <projectName>@1.8.0 start-server
> > nodemon --inspect index.js
> 
> runtime.launch Bootloader imported {
>   env: {
>     inspectorIpc: '\\\\.\\pipe\\node-cdp.23460-e80dd6e7-2.sock',
>     deferredMode: false,
>     waitForDebugger: '',
>     execPath: 'C:\\Program Files\\nodejs\\node.exe',
>     onlyEntrypoint: false,
>     verbose: true,
>     autoAttachMode: 'always'
>   },
>   args: [
>     'C:\\Program Files\\nodejs\\node.exe',
>     'C:\\Users\\<username>\\Projects\\<projectName>\\node_modules\\nodemon\\bin\\nodemon.js',
>     '--inspect',
>     'index.js'
>   ]
> }
> runtime Set debug mode { mode: 2 }
> [nodemon] 3.1.0
> [nodemon] to restart at any time, enter `rs`
> [nodemon] watching path(s): *.*
> [nodemon] watching extensions: js,mjs,cjs,json
> [nodemon] starting `node --inspect index.js`
> runtime.launch Bootloader imported {
>   env: {
>     inspectorIpc: '\\\\.\\pipe\\node-cdp.23460-e80dd6e7-2.sock',
>     deferredMode: false,
>     waitForDebugger: '',
>     execPath: 'C:\\Program Files\\nodejs\\node.exe',
>     onlyEntrypoint: false,
>     verbose: true,
>     autoAttachMode: 'always'
>   },
>   args: [
>     'C:\\Program Files\\nodejs\\node.exe',
>     'C:\\Users\\<username>\\Projects\\<projectName>\\index.js'
>   ]
> }

@bholemaharaj
Copy link
Author

I have reset settings.json to default but debugging is not still not working.

@bholemaharaj
Copy link
Author

Ok, here is something that might help, debugging started to work in VS Code, I uninstalled the node v23.3.0 and installed the current LTS version. Not sure if that fixed the issue. Something you may want to verify. Thanks.

@bholemaharaj
Copy link
Author

While encountering the issues on my work machine, I verified that the problem stemmed from Node.js v23.3.0, which caused debugging to stop working in VS Code. To confirm this, I tested debugging on my personal Windows 11 machine using Node.js v23.3.0 and observed the same issue. After uninstalling v23.3.0 and installing the LTS version (v22.12.0), debugging started working as expected.
Hope this helps to further investigate why and what may be causing this issue.
Thanks.

@connor4312
Copy link
Member

connor4312 commented Dec 12, 2024

nodejs/node#56002 use Node <=23.1

@connor4312 connor4312 added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Dec 12, 2024
@HuangZhuo
Copy link

I just tried a lot of launch configurations to solve this issue, and finally I found this! Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

4 participants