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

Test: condition editing for exception breakpoints #111425

Closed
2 tasks done
isidorn opened this issue Nov 27, 2020 · 0 comments
Closed
2 tasks done

Test: condition editing for exception breakpoints #111425

isidorn opened this issue Nov 27, 2020 · 0 comments
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues testplan-item
Milestone

Comments

@isidorn
Copy link
Contributor

isidorn commented Nov 27, 2020

Refs: #111227

Complexity: 3

Authors: @weinand, @isidorn

Create Issue


We have added a new debugger feature to edit conditions for exception breakpoints. Currently no "real" debug adapter supports this but some extensions plan to jump on this soon.

In order to be able to test the new feature, we've enhanced Mock Debug to support the feature in the following way:

If a line contains the word exception or the pattern exception(name) an exception is thrown.
To make the debugger stop when an exception is thrown, two "exception options" exist in the BREAKPOINTS view:

  • Named Exception: if enabled and configured with a condition (e.g. xxx) the debugger will break on the exception(xxx) pattern.
  • Other Exceptions: if enabled the debugger will break on the word exception and the exception(...) pattern if not matched by "Named Exception".

Just install Mock Debug version 1.45.2.

Then create a markdown file in VS Code, e.g. this readme.md:

The first line.

If a line contains the word exception or the pattern exception(name) an exception is thrown.

Another named exception(foo).

Open this file in VS Code, set a breakpoint on the first line, and start debugging by pressing the Debug button in the editor's toolbar.

Once debugging has started and you've hit the breakpoint verify:

  • The BREAKPOINTS view shows two exception options:
    2020-11-30_22-32-11
  • You can use the context menu action Edit Condition... on "Named Exception" to get an inline input box where you can enter a condition
  • "Other Exceptions" does not provide the context menu action
  • Once an exception breakpoint has a condition it is rendered next to it. Hover over the condition also shows it
  • After pressing the Continue button you should break on the exceptions
  • If you reload VS Code or restart the debug session the exception breakpoint condition is preserved
  • You can edit the condition again to remove it

Please note: Focus on the UX experience; whether the condition is actually respected correctly by Mock debug is not important.

@isidorn isidorn added debug Debug viewlet, configurations, breakpoints, adapter issues testplan-item labels Nov 27, 2020
@isidorn isidorn added this to the November 2020 milestone Nov 27, 2020
@alexr00 alexr00 removed their assignment Dec 1, 2020
@sbatten sbatten removed their assignment Dec 1, 2020
@sbatten sbatten closed this as completed Dec 1, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jan 16, 2021
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 testplan-item
Projects
None yet
Development

No branches or pull requests

3 participants