Try this configuration in your launch file:
{
"name": "Attach to Process",
"type": "node",
"protocol": "inspector",
"request": "attach",
"stopOnEntry": false,
"port": 5858,
"localRoot": "${workspaceRoot}",
"remoteRoot": "/somepath/myprojectroot",
"sourceMaps": true
}
Make sure the remoteRoot is correct path, otherwise it won't know where to look for the source files.
Top answer 1 of 16
23
Try this configuration in your launch file:
{
"name": "Attach to Process",
"type": "node",
"protocol": "inspector",
"request": "attach",
"stopOnEntry": false,
"port": 5858,
"localRoot": "${workspaceRoot}",
"remoteRoot": "/somepath/myprojectroot",
"sourceMaps": true
}
Make sure the remoteRoot is correct path, otherwise it won't know where to look for the source files.
2 of 16
14
On the VSCode settings search for 'debug javascript use preview', and then disable it. It should now bound all breakpoints.
GitHub
github.com › microsoft › vscode › issues › 107251
VSCODE does not stop on breakpoints in Node.js apps · Issue #107251 · microsoft/vscode
September 22, 2020 - I recently updated(big mistake apparently!) and now no version of node on my system will stop on breakpoints. Does this issue occur when all extensions are disabled?: Yes/No YES Does this issue occur with various node versions: YES it does · I've also noticed that vscode does not pass along a "debug" arg to node.
Author jxmot
Debugger not stopping on breakpoints
Hey! I'm having issues similar to microsoft/vscode#103048, wanted to create a new issue so I'm not hijacking threads, it seemed like some people over there were having issues with NPM scrip... More on github.com
Vscode node debugger not stopping on breakpoints when launching with nodemon
VSCode Version: 1.10.2 OS Version: Windows 7 Profesionnal, SP1 Hi everyone. I'm trying to debug typescript code (or javascript code) in server side with visual studio code, when launching it wi... More on github.com
Node.js v23.2.0: Breakpoints not binding in VS Code debugger
Version v23.2.0 Platform Microsoft Windows NT 10.0.19045.0 x64 Subsystem Node.js Debugger (V8 Inspector) What steps will reproduce the bug? Install Node.js v23.2.0 Create a simple JavaScript file: ... More on github.com
typescript - VSCode not stopping at breakpoints when test launched using npm and package.json scripts - Stack Overflow
From within VSCode I would like to launch the current file (e.g. my-function.spec.ts) and do interactive debugging setting breakpoints. For the test to run I need to set some environment variables... More on stackoverflow.com
GitHub
github.com › nodejs › node › issues › 56156
Breakpoint Debugging Not Working with Node.js 23.2.0 and 23.3.0 in Visual Studio Code · Issue #56156 · nodejs/node
December 6, 2024 - Run the application using the debugger. Observed Behavior Breakpoints fail to set correctly, and Visual Studio Code shows a message indicating that some breakpoints cannot be applied. The application continues execution without stopping at the breakpoints.
Author IsmaelCoulibalyPLRM
GitHub
github.com › microsoft › vscode-js-debug › issues › 660
Debugger not stopping on breakpoints · Issue #660 · microsoft/vscode-js-debug
July 26, 2020 - I'm having issues similar to microsoft/vscode#103048, wanted to create a new issue so I'm not hijacking threads, it seemed like some people over there were having issues with NPM script arguments which is definitely unrelated for me. Describe the bug When the preview is enabled (now default), no breakpoints, debuggers, or initial breaks are hit. The program runs and exits with code 0 (if the node event loop is clear). To Reproduce Ubuntu 18.04, Using NVM globally, Node binary at 14.3.0, VSCode at 1.47.2, all built-in plugins enabled.
Author jonathanrdelgado
GitHub
github.com › Microsoft › vscode › issues › 23900
Vscode node debugger not stopping on breakpoints when launching with nodemon · Issue #23900 · microsoft/vscode
April 4, 2017 - And the nodejs server is restarting as expected when a javascript file is generated. But I am not able to break on any breakpoint (on typescript files or javascript files). Can you tell me please if it is an issue or if there is something I am missing ? ... debugDebug viewlet, configurations, breakpoints, adapter issuesDebug viewlet, configurations, breakpoints, adapter issues ... You can’t perform that action at this time.
Author TitaneBoy
GitHub
github.com › nodejs › node › issues › 55948
Node.js v23.2.0: Breakpoints not binding in VS Code debugger · Issue #55948 · nodejs/node
November 21, 2024 - Debugger should pause execution at set breakpoints, allowing inspection of program state. Program runs without stopping at breakpoints.
Author carlmattsimpao
Reddit
reddit.com › r/vscode › vs code debug not stopping on breakpoints
r/vscode on Reddit: VS Code debug not stopping on breakpoints
June 10, 2023 -
I'm new to using VS Code as I¡ve always used Eclipse IDE. I'm trying to debug my java file in which I've created a breakpoint, but the debugger just runs the code as if there wasn't such breakpoint..
I've seen some other people struggle with this, so here's my launch.json:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Java",
"type": "java",
"request": "launch",
"stopOnEntry": true,
"jdkPath": "${env:JAVA_HOME}/bin",
"cwd": "${fileDirname}",
"startupClass": "${fileBasenameNoExtension}",
"classpath": [
".",
"${fileDirname}"
]
},
{
"name": "Java Console App",
"type": "java",
"request": "launch",
"stopOnEntry": true,
"jdkPath": "${env:JAVA_HOME}/bin",
"cwd": "${fileDirname}",
"startupClass": "${fileBasenameNoExtension}",
"classpath": [
".",
"${fileDirname}"
],
"externalConsole": true
},
{
"type": "java",
"name": "Current File",
"request": "launch",
"mainClass": "${file}"
},
{
"type": "java",
"name": "Numeros",
"request": "launch",
"mainClass": "Numeros",
"projectName": "progra_4bad0bd0"
}
]
}Thanks in advance
Top answer 1 of 3
1
Did you install the https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack extension?
2 of 3
1
You have two options: 1- Run - just runs, ignore breakpoints - normally the default behaviour 2- Debug - Runs in debu mode Are you definitely running in debug mode?
Medium
medium.com › rockedscience › fix-nodejs-debugger-vscode-401277e2e9be
Fix The Node.JS Debugger Not Attaching In Visual Studio Code | RockedScience
May 16, 2023 - Visual Studio Code makes it very easy to enable the integrated Node.JS debugger and use the breakpoints in your code. Sometimes, after a restart of the computer or the Visual Studio Code application to install updates, the Node.JS debugger will not attach anymore. It’s so tedious, especially if it happens in a busy day. Of course, you can be smart and choose not to deploy updates in such a day, but you have little power over your computer just going FUBAR and crashing when you least wanted it. A few times my VSCode debugger did not attach to the Node.JS processes after a restart of VSCode.
Stack Overflow
stackoverflow.com › questions › 65208753 › node-runs-code-but-does-not-stop-at-breakpoints-in-vscode
node.js - node runs code but does not stop at breakpoints in vscode - Stack Overflow
December 9, 2020 - On further inspection, it appears as though the debugger is working but the code starts first and the debugger attaches later about after 500 lines of code have run. One can replicate this by running the same code in a for loop to 1000 with a breakpoint on the console.log() line.
Super User
superuser.com › questions › 1495144 › visual-studio-code-debugger-for-node-application-stops-at-runmicrotasks-in-next
Visual Studio Code debugger for Node application stops at runMicroTasks in next_tick.js instead of in the specified breakpoint
October 23, 2019 - The solution is simply to click on the top of the call stack in the debugger view on the side(refer screenshot). ... Additionally for subsequent breakpoints, if the debugger always stops at the next_tick.js file, then in the call stack in the ...
GitHub
github.com › microsoft › vscode › issues › 22761
Node debugger not stopping on breakpoints when connected remotely to Docker · Issue #22761 · microsoft/vscode
However, if I bring up the service in a container (using npm start stack:debug), manually adding a debugger; statement causes code to break execution; however, a breakpoint in VS Code does not. Webpack is outputting the compiled files with inline source maps into ./dist. I'm reasonably confident that I've got the localRoot and remoteRoot correct as, if I muck about with them at all, my breakpoints go grey.
Stack Overflow
stackoverflow.com › questions › 53197701 › vscode-debugger-not-stopping-on-breakpoints-while-debugging-a-remote-node-server
node.js - VScode debugger not stopping on breakpoints while debugging a remote node server - Stack Overflow
November 8, 2018 - I'm trying to debug my remote node server through VSCode and it doesn't stop on any of the breakpoints i've configured. I'm running VSCode on my mac where i have one copy of the node project and i have another copy of the same node project on a remote machine, both copies of the node project are synced. i'm running the node server on the remote machine using the following command: ... { "name": "Attach", "type": "node", "request": "attach", "port": 5858, "address": "remote server addr", "localRoot": "${workspaceFolder}", "remoteRoot": "the path to project directory on remote server", "protocol": "auto" }
GitHub
github.com › vitest-dev › vitest › issues › 5380
Debugger in vs-code does not stop at breakpoint but elsewhere · Issue #5380 · vitest-dev/vitest
March 13, 2024 - Describe the bug In vanilla project with vue3 + vitest + @testing-library/vue + node 18.18.2 or 20.11.1, setting and debugging breakpoints in vs-code on windows 11 does not work as expected. Debugger stops at wrong location. I am using v...
Author bonham
GitHub
github.com › Microsoft › vscode › issues › 45448
Doesn't stop on breakpoints · Issue #45448 · microsoft/vscode
September 3, 2018 - Issue Type: Bug Set a breakpoint and run. It does not stop anymore. I believe 1.20 and earlier worked, but not in 1.21. This happens when running a test suite via jest is against code using TypeScript (v2.7.2) and using ts-jest (v21.2.4)...
Author manu-st
