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

Debugger won't stop at breakpoints #270

Open
aashish108 opened this issue Sep 24, 2024 · 1 comment
Open

Debugger won't stop at breakpoints #270

aashish108 opened this issue Sep 24, 2024 · 1 comment

Comments

@aashish108
Copy link

aashish108 commented Sep 24, 2024

Hi, I can't seem to get the debugger to pause at breakpoints; I see the console logs though.

This is the error in the console also: Debugger: error: adapter failed hover evaluation Stack frame not found

But, if I use debugger via Chrome and inspect the Node.js process and leave a breakpoint in Chrome, I see the breakpoint in Sublime Text Debugger.

Any clues as to whats going on here pls? Heres the config I am using:

{
    "folders": [
        {
            "path": "/Users/name/Projects/Web/w-project"
        }
    ],
    "debugger_configurations": [
        {
            "name": "Attach to Node.js",
            "type": "node",
            "request": "attach",
            "port": 9229,
            "address": "localhost",
            "restart": false,
            "localRoot": "${workspaceFolder}",
            "remoteRoot": "/Users/name/Projects/Web/w-project",
            "skipFiles": ["<node_internals>/**"],
            "outFiles": ["dist/**/*.js"],
            "resolveSourceMapLocations": [
				"dist/**/*.js.map",
                "dist/**/*.js"
			]
        }
    ]
}

Sublime Text build: 4180
macOS 14.6.1

@aashish108 aashish108 changed the title Debugger won't stop ab breakpoints Debugger won't stop at breakpoints Sep 24, 2024
@daveleroy
Copy link
Owner

Debugger: error: adapter failed hover evaluation Stack frame not found is from hovering the mouse over something that looked like an expression its not an issue.

If the breakpoints are gray when you start the debugger then the adapter was unable to verify them. You can hover over the breakpoint and it should have a message from the adapter which may or may not be useful.

My guess would be there is some configuration issue which is not allowing the adapter to determine where to place the breakpoints in the generated source files. I believe resolveSourceMapLocations, outFiles, localRoot, remoteRoot all impact breakpoints but thats a bit beyond my knowledge of how js debug adapter works (https://github.com/microsoft/vscode-js-debug)

Microsoft has a bunch of docs which might help such as https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_source-maps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants