Skip to content

Add support for breakpoint dependencies (trigger points) #152428

Closed

Description

When debugging a production level application like an angular app, java microservice we often need to add breakpoints into methods which are called frequently. For an example rendering method in the frontend or event subscriber on the consumer. But most of the time we are only interested to suspend on these methods when it was triggered from a another operation which we are interested of.

How this is done in Eclipse is using trigger point, We can add a trigger point (different kind of a breakpoint) on the operation which is called before our debugging method, so once only this trigger point is hit, our rendering or event subscription breakpoint will get enabled. In IntelliJ this is done using breakpoint dependencies.

having this support for vscode would be really beneficial, if we can build this on the vscode debug extension layer, we could even support polygot scenarios, where the trigger point is in one app we are debugging and actual breakpoint which get enabled might be on another app.

Activity

  1. added
    debug
    feature-request
    on Jun 17, 2022
  2. vscodenpa commented on Jun 17, 2022

    @vscodenpa

    This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

    Happy Coding!

  3. vscodenpa commented on Aug 7, 2022

    @vscodenpa

    This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

    Happy Coding!

  4. vscodenpa commented on Aug 17, 2022

    @vscodenpa

    🙁 In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.

    Happy Coding!

  5. gayanper commented on Sep 8, 2022

    @gayanper
    ContributorAuthor

    Andre Weinand (@weinand) what if we go with the approach of making the dependent breakpoints hit state a different type of condition ?

    So that in breakpoint widget, in condition editor we can add a swicter to switch between expression and break point dependency.

    its similar to what intellij offers. WDYT?

  6. gayanper commented on Sep 8, 2022

    @gayanper
    ContributorAuthor

    To answer roblourens about conditions, yes you can have a condition on the trigger point. Because the conditions are evaluated by DA and only if it satisfied the DA will tell the client that the breakpoint is hit. Then only we will act on it to enable non trigger breakpoints as of current implementation

  7. 13 remaining items

  8. roblourens commented on Nov 22, 2022

    @roblourens
    Member

    I will take a look at this Gayan Perera (@gayanper), I'm still a little unsure about committing to the feature as a whole, and it needs some UX work, but I will take a closer look when I have time. Due to the holiday, that may not be until early December. Thanks for your work on this so far.

  9. gayanper commented on Dec 4, 2022

    @gayanper
    ContributorAuthor

    I will take a look at this Gayan Perera (@gayanper), I'm still a little unsure about committing to the feature as a whole, and it needs some UX work, but I will take a closer look when I have time. Due to the holiday, that may not be until early December. Thanks for your work on this so far.

    Let me know if we need to do some UI changes, i don't mind spending some time on changes that requires to make this change available in vscode.

  10. gayanper commented on Dec 19, 2022

    @gayanper
    ContributorAuthor

    Any update on this issue and the connected PR ? Could we have a timeline where this can be discussed and see how we can get this functionality merged. Also if vscode team thinks this is not something that would fit the product please let me know as well, so I can look into how i can implement same functionality as an extension using the extension API

  11. gayanper commented on Jan 8, 2023

    @gayanper
    ContributorAuthor

    roblourens Andre Weinand (@weinand) I also see that Jetbrains Fleet also trying to keep breakpoint properties simpler without adding other than conditions. Are you considering the same ? If so do you see implementing the same feature with a different configuration panel as an extension might be good choice and may be suggest extensions-points/APIs for missing pieces ?

  12. roblourens commented on Jan 8, 2023

    @roblourens
    Member

    Yeah, this should be possible with our extension APIs, e.g. debug.addBreakpoints:

    export function addBreakpoints(breakpoints: readonly Breakpoint[]): void;
    and at the moment I am leaning towards saying that this sort of functionality would be better in an extension. Of course then there would be a compromise of UX and functionality. I'm wondering whether you'd be interested in doing some investigation here, like a quick prototype, to see whether the API we have could give a decent experience for this feature.

  13. gayanper commented on Jan 11, 2023

    @gayanper
    ContributorAuthor

    roblourens Yes thats sounds like a good idea. I can try that and share here.

  14. mblout commented on Apr 21, 2023

    @mblout
    Contributor

    I'm finding that I need (source) breakpoint enhancements for some functionality we are trying to duplicate from an existing debugger, and I think it overlaps with a lot of what has been mentioned here.

    At a minimum (MVF - minimum viable feature)-

    • an additional property in a (Source)Breakpoint (just a string?), that only has meaning to the extension
    • ability to set this data programatically on creation (onWillChangeBreakpoints? or anything?)

    Bonus:

    • ability to change the visualization of the breakpoint; minimally, some color/image/anything simple. and being able to change it at any time; for my case, being able to make it 'not there' would be ideal; meaning, i could hide it, and the user could add another source breakpoint (same place, or elsewhere).
    • ability to represent the additional property somehow in the breakpoint list view

    My use case is, while debugging, i need the be able to allow the user to set a breakpoint for the selected thread in the UI (I know it sounds weird, but threads are really 'tasks' in our use case). So, if debugging, and they select 'thread' X, only the breakpoints for 'thread' X show, they can add remove as normal, and those breakpoints are created with some property indicating they are meant for thread "x". And when not debugging, all breakpoints show.

    I'm currently trying to find some alternate compromise with some combination of 'tricks' below that could allow us to move forward for now, but its all very strange for the user;

    • keeping track of 'additional breakpoint' information ourselves in workspace storage (and showing in the bp view tooltip)
    • listening for breakpoint changes, and immediately deleting and (re)adding breakpoints (trying to leverage 'column' somehow)
    • using the (new) editor/lineNumber/context inline menu stuff.
    • using 'unverified' state as the the closest thing to 'hiding', and trying to explain it in the tooltip message in the breakpoint view.
    • maybe leveraging two-lane gutters to help with the "is valid for selected thread" visualization
    • etc.

    It might make some sense to separate out to a separate feature-request, but wanted to mention it here first, if there's ideas how how these might be related. I also understand that separating the "UI-related" parts might make the non-UI parts easier to provide.

  15. gayanper commented on Jul 11, 2023

    @gayanper
    ContributorAuthor

    Yeah, this should be possible with our extension APIs, e.g. debug.addBreakpoints:

    export function addBreakpoints(breakpoints: readonly Breakpoint[]): void;

    and at the moment I am leaning towards saying that this sort of functionality would be better in an extension. Of course then there would be a compromise of UX and functionality. I'm wondering whether you'd be interested in doing some investigation here, like a quick prototype, to see whether the API we have could give a decent experience for this feature.

    I look into implementing this feature as an extension, But unfortunately I don't see a way of listening breakpoints to get notified when they are hit. Is there a a possibility to do this ?

  16. modified the milestones: On Deck, on Jan 19, 2024
  17. connor4312 commented on Jan 19, 2024

    @connor4312
    Member

    Done in #166202

  18. locked and limited conversation to collaborators on Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

debugfeature-requeston-testplanunder-discussion

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions