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
Debug: setting expression and hit-count at the same time does not hit anything #14369
Comments
It is supported, if the breakpoint is not being hit it is coming from the adapter, thus assigning to @weinand |
Works fine for me. I was using this example: var i = 0;
for (i = 0; i < 100; i++) {
console.log(i);
} As a condition I used With this the execution stopped for i == 10, 30, 50, 70, ... @isidorn However, setting both expressions on a breakpoint seems to be a bit fragile. I had to try two times until both expressions stuck to the breakpoint (here it would have helped if the hover would show both expressions see #14359). |
Not sure if related but I was debugging an extension. |
I tried my snippet in an extension and still works fine |
I have implemented hit count support in the PowerShell extension (well, PR is waiting to be accepted) and in my testing, both the condition and hitCondition come through to the debug adapter. After that, it is up to the debug adapter to do the right thing.
I noticed this too. You have to hit enter and not just change the value and select the drop down to change from say Expression to Hit Count (or vice versa). If you do the latter, your change doesn't take. But when you press enter to accept a value, the UI goes away. So if you want to set both fields, the UI is a tiny bit tedious. @weinand What's up with the value you used I also agree on the hover tip, need to see both conditions. Looks like that has been fixed already. Yay! |
@rkeithhill The debug protocol does not specify the syntax of the hit count expression. So you are free to accept and validate whatever you want. For node I'm basically using the same as the xDebug protocol for php. But the node implementation does not yet validate what it receives. |
Assigning to @isidorn since the issue at hand seems to be more of an UX problem. |
Closing this as there are no steps and I can not reproduce any of the mentioned issues. Please reopen if you still see this on your machine and try to find steps - if not ping me and I wlll come to your machines. Thanks |
For me, the only issue that exists here is that the dropdown UI does not save the current value when switching between Expression and Hit Count. I know the watermark text says to hit press Enter but I think a fair number or folks will type an Expression, hit the drop down to set the Hit Count, then they press Enter. In this scenario only the Hit Count is accepted. The condition expression is not. |
@rkeithhill got it -> for that I have created the issue #15151 |
@isidorn @weinand is it expected that if I define both hit count and expression, the breakpoint is only hit when the hit count expression is met? Here is my repro:
=> breakpoint only gets hit when executing the hello world command twice |
This is up to the debug adapter to decide. But from how I understand it both conditions need to be true in order for the breakpoint to be hit. |
Sure both conditions need to be true in order to 'break'. |
Testing #13211
=> the breakpoint is never being hit
I can provide more steps to reproduce but maybe this scenario is not even supported?
The text was updated successfully, but these errors were encountered: