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

Conditional breakpoints: up/down to navigate through condition history #50412

Closed
digeff opened this issue May 24, 2018 · 8 comments
Closed

Conditional breakpoints: up/down to navigate through condition history #50412

digeff opened this issue May 24, 2018 · 8 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality *out-of-scope Posted issue is not in scope of VS Code
Milestone

Comments

@digeff
Copy link

digeff commented May 24, 2018

Every time I use conditional breakpoints I use the same condition for a lot of breakpoints, or all breakpoints.

e.g.: In the chrome debug adapter core I want to debug the scriptParsed event for app.js, so I put several breakpoints to do this, and then I put a condition so that the breakpoints won't stop for files other than app.js

It'd be great if there was a way to set a global condition that applies to all breakpoints, or to all breakpoints or a single file, or to a set of breakpoints.

Regarding the UI:
Maybe we could add a context menu on each file, and you can put a condition and breakpoints on that file only stop if that condition is true:

image

Or add an All Breakpoints line in the breakpoints widget where you can configure the condition for all breakpoints:
image

@roblourens roblourens assigned isidorn and unassigned roblourens May 24, 2018
@roblourens roblourens added feature-request Request for new features or functionality debug Debug viewlet, configurations, breakpoints, adapter issues labels May 24, 2018
@roblourens
Copy link
Member

Another solution would be to have history in the breakpoint condition input box, where you can press the up arrow, just like in the console. That would make it a bit easier to reuse conditions.

@digeff
Copy link
Author

digeff commented May 25, 2018

Sometimes I want to refine the original condition after I added it. It'd be great if the different breakpoints shared the same condition identity, so I'd only need to update a single condition instead of one per breakpoint when I change it.

@isidorn
Copy link
Contributor

isidorn commented May 28, 2018

I like @roblourens suggestion, that up / down would navigate condition history.
Updating the global condition sounds too complex and a very specific use case imho. So we would not do that.

@digeff would the up/down arrows to go through history help at all in your use case?

@roblourens
Copy link
Member

As a workaround you could set up global conditions yourself with a bp condition like global.myCondition() then in the debug console, define the condition with global.myCondition = () => true then you can edit the condition for all those BPs at the same time.

That's kind of a stretch but might be a useful hack in some cases.

@digeff
Copy link
Author

digeff commented May 29, 2018

I think that the up / down navigation will certainly help.

Would it be possible to also add telemetry to count how many times the user uses the exact same condition for different breakpoints? That way we'll know in the future if this is a scenario that customers care about or not.

@isidorn
Copy link
Contributor

isidorn commented May 30, 2018

Renaming this issue to reflact the open / down arrow feature request which we might actually add.
We might consider adding telemetry but not for now.

In the meantime you can use @roblourens workaround

@isidorn isidorn changed the title [Feature] Global conditional breakpoints Conditional breakpoints: up/down to navigate through condition history May 30, 2018
@isidorn isidorn added this to the On Deck milestone May 30, 2018
@isidorn isidorn added the *out-of-scope Posted issue is not in scope of VS Code label Oct 8, 2019
@vscodebot
Copy link

vscodebot bot commented Oct 8, 2019

This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.

If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

Thanks for your understanding and happy coding!

@vscodebot vscodebot bot closed this as completed Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues feature-request Request for new features or functionality *out-of-scope Posted issue is not in scope of VS Code
Projects
None yet
Development

No branches or pull requests

3 participants