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 set function breakpoint #44495

Closed
chrmarti opened this issue Feb 27, 2018 · 8 comments
Closed

Cannot set function breakpoint #44495

chrmarti opened this issue Feb 27, 2018 · 8 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues

Comments

@chrmarti
Copy link
Collaborator

Issue Type: Bug

Testing #43836

Following the documentation on this, the function breakpoint did not work. Also note that in the screenshot the function breakpoint is shown as resolved, but when I add it while the program is running, it is shown as unresolved.

image

VS Code version: Code - Insiders 1.21.0-insider (1a84a88, 2018-02-27T06:09:52.377Z)
OS version: Darwin x64 16.7.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz (8 x 2200)
Load (avg) 2, 2, 2
Memory (System) 16.00GB (0.25GB free)
Process Argv /Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron --user-data-dir tmp/user --extensions-dir tmp/ext
Screen Reader no
VM 20%
Extensions: none Reproduces without extensions
@vscodebot vscodebot bot added the insiders label Feb 27, 2018
@isidorn isidorn assigned weinand and unassigned isidorn Feb 27, 2018
@isidorn isidorn added debug Debug viewlet, configurations, breakpoints, adapter issues and removed insiders labels Feb 27, 2018
@isidorn
Copy link
Contributor

isidorn commented Feb 27, 2018

@weinand can you please investigate if the backend is providing the expected data.

@weinand
Copy link
Contributor

weinand commented Feb 27, 2018

What node.js version are you using?

Please be aware of the limitations of function breakpoints: https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_function-breakpoints
You must use the "legacy" protocol which requires node.js < 8.0. If you are using "nvm" you can add a "runtimeVersion" attribute to your launch config.

@weinand weinand added the info-needed Issue requires more information from poster label Feb 27, 2018
@chrmarti
Copy link
Collaborator Author

Retried with v6.11.3 and it didn't work. (This time the function breakpoint was shown as unconfirmed when I started debugging.)

@joaomoreno
Copy link
Member

joaomoreno commented Feb 27, 2018

This also didn't work for me in extension development.

@weinand weinand added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Mar 2, 2018
@weinand
Copy link
Contributor

weinand commented Sep 18, 2018

node.js versions >= 8.0 no longer support function breakpoints.

@weinand weinand closed this as completed Sep 18, 2018
@isidorn
Copy link
Contributor

isidorn commented Sep 18, 2018

@weinand should the adapter then return function breakpoints as unverified. Or it already does that but the UI is not respecting it?

@weinand
Copy link
Contributor

weinand commented Sep 18, 2018

for node.js >= 8 the adapter does not support function breakpoints so "supportsFunctionBreakpoints" is falsy. VS Code should not call functionBreakpoints and there is no response.

for node.js < 8 the DA sends back Breakpoint with the "verified" property set to true, see:
https://github.com/Microsoft/vscode-node-debug/blob/602790fc530a89825bcc779b2f4cfbb249c8a199/src/node/nodeDebug.ts#L2121-L2127

@isidorn
Copy link
Contributor

isidorn commented Sep 18, 2018

In the latest we properly show that the breakpoint is not resolved no matter when it is added. So imho this behaves fine now
screen shot 2018-09-18 at 16 33 29

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues
Projects
None yet
Development

No branches or pull requests

4 participants