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

Anti-breakpoints, to ignore certain exceptions when "all exceptions" is checked in the debugger #53795

Closed
AmeliaBR opened this issue Jul 7, 2018 · 3 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *question Issue represents a question, should be posted to StackOverflow (VS Code)

Comments

@AmeliaBR
Copy link

AmeliaBR commented Jul 7, 2018

Issue Type: Feature Request

When working with build chains that catch and re-throw exceptions from my scripts, I often need to check the "Break on all exceptions" (instead of only on uncaught exceptions) option in order for the debugger to break at the point of the original exception, with the correct call stacks and scopes. But then the script breaks on all sorts of well-handled exceptions elsewhere in the build, too.

It would be useful if I could mark these well-handled exceptions to be excluded from the "All exceptions" option.

I am picturing something similar to breakpoints, that you would assign to a line of code, but which would indicate "don't break here, even if there is an exception". There could also be conditional anti-breakpoints, but the condition would only be evaluated if an exception would cause a break on that line, and would determine whether or not to actually break.

VS Code version: Code 1.25.0 (0f080e5, 2018-07-05T13:11:58.697Z)
OS version: Windows_NT x64 10.0.17134

@vscodebot
Copy link

vscodebot bot commented Jul 7, 2018

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@weinand
Copy link
Contributor

weinand commented Jul 9, 2018

You can try to use the "skipFiles" option for this
(see https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_skipping-uninteresting-code-node-chrome)

Under skipping rules you find this:

If you have set the option to break on thrown exceptions, then you won't break on exceptions thrown from skipped files.

@weinand weinand added *question Issue represents a question, should be posted to StackOverflow (VS Code) and removed new release labels Jul 9, 2018
@vscodebot
Copy link

vscodebot bot commented Jul 9, 2018

Please ask your question on StackOverflow. We have a great community over there. They have already answered thousands of questions and are happy to answer yours as well. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Jul 9, 2018
@weinand weinand added the debug Debug viewlet, configurations, breakpoints, adapter issues label Jul 9, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Aug 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *question Issue represents a question, should be posted to StackOverflow (VS Code)
Projects
None yet
Development

No branches or pull requests

2 participants