Skip to content

Conversation

@omarArm
Copy link
Contributor

@omarArm omarArm commented May 13, 2025

Previous behaviour:

Users were able to add breakpoints from the GUI of vscode itself. However, if a user set a breakpoint from the debug console, the breakpoint would not get reflected on the GUI with a red dot, even though the breakpoint was set by GDB in the backend.

Changes:

Users can now set breakpoints from the debug console and the behaviour will be reflected on the GUI. The GDB breakpoint notifications (breakpoint-created, breakpoint-modified, breakpoint-deleted) are now handled on the adapter's side.

Problems:
VScode has a bug in which standard Breakpoint events do not trigger a re-rendering of the breakpoint GUI. Breakpoints are visible in the breakpoints list on the side panel, but red dots are not visible on the source code. Therefore, I created a custom event that would trigger a re-rendering for vscode, so that red dots can appear on the source file
VScode

@omarArm omarArm force-pushed the addBreakpointFeatures branch from 52a9e70 to a28a790 Compare May 13, 2025 13:10
Copy link
Contributor

@jreineckearm jreineckearm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove changes supposed to be in #366 only.
Also, please think about some useful tests for this.

@omarArm omarArm force-pushed the addBreakpointFeatures branch from a28a790 to 6be3dc1 Compare May 14, 2025 06:26
@omarArm
Copy link
Contributor Author

omarArm commented May 14, 2025

I cleaned the irrelevant changes. Sorry about that, I did something on my fork and it got reflected in the PR. I will think of some tests sure and add them in a separate PR

Copy link
Contributor

@jonahgraham jonahgraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This overall looks good to me. I very much like that you have implemented this feature.

I have a few requests, but I'll leave it to @jreineckearm for a final review on this:

  1. Can you please add some tests for the isBreakpointInRightLocation related logic 2. Can you add a test for user inserting breakpoint and deleting breakpoint via CLI
  2. Can you document UpdateBreakpointView somewhere? Perhaps a new method called sendUpdateBreakpointView that all there locations call and that new method can have some doc?

@jreineckearm
Copy link
Contributor

Thanks, @jonahgraham, for the feedback! @omarArm is working on the tests but off today. We'll make sure to cover your feedback when he's back.

omarArm and others added 3 commits May 22, 2025 14:23
Author: Omar Elkhouly <omar.elkhouly@arm.com>
Date: Tues May 13

Co-authored-by: Jens Reinecke <jens.reinecke@arm.com>
@omarArm omarArm force-pushed the addBreakpointFeatures branch from 6a51657 to ecb09d1 Compare May 22, 2025 12:23
@omarArm
Copy link
Contributor Author

omarArm commented May 22, 2025

Thanks @jonahgraham for the feedback, I added two extra tests now and refactored my code a bit. The tests are getting longer and longer unfortunately though

@jonahgraham
Copy link
Contributor

That's great @omarArm - let me know when all the tests are passing and want me to re-review this. Let me know if you have any questions on how to diagnose test failures on the buildmachine. If you haven't already seen it, please have a look at this part of the readme: https://github.com/eclipse-cdt-cloud/cdt-gdb-adapter/blob/main/src/integration-tests/README.md#test-logs-and-test-reports

Copy link
Contributor

@jreineckearm jreineckearm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work on this, @omarArm ! I know this turned out to be more complex than I'd initially thought. Thanks for staying on it.

Good to merge, will do so in the morning as I have to call it a day now. This gives also Jonah a chance to have another look if he fancies.

@jreineckearm jreineckearm merged commit b088682 into eclipse-cdt-cloud:main May 27, 2025
4 checks passed
omarArm added a commit to omarArm/cdt-gdb-adapter that referenced this pull request May 27, 2025
* Added support for breakpoint setting from the debug console
* Adding tests for changes in the handleGDBNotify function
* Adding tests for better setBreakpointRequest coverage
* skipping breakpoint tests when gdb is not in async mode

Author: Omar Elkhouly <omar.elkhouly@arm.com>
Date: Tues May 13

---------

Co-authored-by: Jens Reinecke <jens.reinecke@arm.com>
Copy link
Contributor

@jonahgraham jonahgraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM - sorry I didn't see the ready to review update until after it got merged this time. (to be clear it was ok with me to merge, you shouldn't wait for me unless you really need my input)

@omarArm omarArm deleted the addBreakpointFeatures branch June 11, 2025 17:36
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

Successfully merging this pull request may close these issues.

3 participants