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

"Wait for breakpoint" Triggered break points #1152

Open
s1n7ax opened this issue Feb 6, 2024 · 1 comment
Open

"Wait for breakpoint" Triggered break points #1152

s1n7ax opened this issue Feb 6, 2024 · 1 comment

Comments

@s1n7ax
Copy link

s1n7ax commented Feb 6, 2024

Problem Statement

VSCode added a new break point type called "Wait for Breakpoint" which basically only will be stopped if the debugger is stopped at selected break point first.

Steps:

  • User sets a breakpoint in test.js file at line 10
  • User right clicks on the number line and select Triggered Breakpoint in test.js file at line 20
  • User select "Wait for Breakpoint" from the first select menu & select the breakpoint at line 10 in the 2nd select menu
  • Run the debugger

When running, debugger will not stop at line 20 until line the debugger stops at the line 10 debug point.

for(i = 0; i < 10; i++) {
    if(i == 5) {
        console.log('first breakpoint')
    }

    console.log('second breakpoint')
    // ^^^ here we set the "Wait for Breakpoint" type breakpoint. Until the debugger stops at
    // `first breakpoint` debugger will not stop at the `second breakpoint`
}

Possible Solutions

No response

Considered Alternatives

No response

@mfussenegger
Copy link
Owner

Some kind of dependent breakpoint support is on the roadmap but I'm not sure yet how it should work like from a UI/interaction point of view.

Intellij has the feature as well, but the couple of times I could've used it I ended up manually setting the first breakpoint, wait until it is hit, and then set the other breakpoint. In part because the effort to set it up was similar and I'm not sure how it can be improved. A thought I had was to allow attaching arbitrary actions to a breakpoint - including macros. But that still doesn't make it much better than setting the second breakpoint manually after the first one was hit.

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