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

Debug Protocol: breakpoint hit counts #37

Closed
jacdavis opened this issue Jun 23, 2016 · 6 comments
Closed

Debug Protocol: breakpoint hit counts #37

jacdavis opened this issue Jun 23, 2016 · 6 comments
Assignees

Comments

@jacdavis
Copy link

In order to use the vscode protocol in vs and xamerin, we would need the ability to support breakpoint hit counts. This is similar to a breakpoint condition, but allows the debug engine to control the number of times a bp would be hit. We currently support four types of hit counts:
public enum enum_BP_PASSCOUNT_STYLE {
BP_PASSCOUNT_NONE = 0x0000,
BP_PASSCOUNT_EQUAL = 0x0001,
BP_PASSCOUNT_EQUAL_OR_GREATER = 0x0002,
BP_PASSCOUNT_MOD = 0x0003
};

These are:

  1. No hit count (default)
  2. hit count equal to a value
  3. hit count greater than or equal to a value
  4. hit count is a multiple of a hit count.

The VS interface for this provides the user's value (number of interest) and a type:
https://msdn.microsoft.com/en-us/library/bb146656.aspx

@weinand weinand self-assigned this Jun 24, 2016
@weinand weinand modified the milestones: backlog, July 2016 Jun 24, 2016
@weinand weinand modified the milestones: August 2016, July 2016 Aug 8, 2016
@weinand weinand modified the milestones: September 2016, August 2016 Aug 28, 2016
@weinand weinand added this to the September 2016 milestone Sep 6, 2016
@weinand
Copy link
Contributor

weinand commented Sep 19, 2016

I propose to add a string typed "hitCount" attribute to the breakpoints requests.
The frontend would provide UI for editing this attribute and the backend would have to interpret the string appropriately. E.g. the 3 VS options from above could be encoded as '= n', '>= n', and '% n'.
node-debug would only accept a positive integer.

@roblourens
Copy link
Member

I think it would be easier to work with if the 'type' was broken out into an enum or string, like in the VS protocol.

@weinand
Copy link
Contributor

weinand commented Sep 19, 2016

@roblourens how should we support this in the UI then? Breaking out 'type' would require additional protocol to enumerate the UI strings for the 'type' options.
I've tried to keep this section of the protocol minimal because I expect most adapters to only implement the hit count type 'equal'.

@roblourens
Copy link
Member

Actually, I agree - I was imagining that every debug adapter would implement the same 4 types. But if it's up to the debug adapter to implement it their way with their options, we should just provide an input box, pass the input along, and let the debug adapter interpret it.

@DavidKarlas
Copy link
Member

In XS, this will work fine, we will just hardcore our enum values to logical expressions.(not really sure why first two options are useful :))
image

@jacdavis
Copy link
Author

I believe this proposal will work for VS as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants