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

Fix enable/disable of verified breakpoints if moved #9479

Merged

Conversation

thegecko
Copy link
Member

@thegecko thegecko commented May 13, 2021

Signed-off-by: thegecko rob.moran@arm.com

What it does

This PR fixes the issue of not being able to enable/disable verified breakpoints if they have moved their location.

This is as mentioned in: #8222 (comment)

@marechal-p this may also fix the issue you've seen in #8222 , but I've been unable to verify that.

How to test

  • Set a breakpoint on a non-code line (e.g. on a line with a comment) before or during a debug session
  • Once verified, it should move to a different line
  • Notice that disabling the breakpoint in its new position removes it. This PR fixes that.

Review checklist

Reminder for reviewers

Signed-off-by: thegecko <rob.moran@arm.com>
@vince-fugnitto vince-fugnitto added bug bugs found in the application debug issues that related to debug functionality labels May 14, 2021
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

I confirmed that it fixes the issue where if a breakpoint exists on a non-code line (comment), it moves to the next corresponding code line. I verified this with multiple breakpoints as well:

image

Like vscode, it also fails if we do something like the following :)

image

@@ -50,7 +50,8 @@ export class DebugSourceBreakpoint extends DebugBreakpoint<SourceBreakpoint> imp
const { uri, raw } = this;
let shouldUpdate = false;
let breakpoints = raw && this.doRemove(this.origins.filter(origin => !(origin.raw.line === raw.line && origin.raw.column === raw.column)));
if (breakpoints) {
// Check for breakpoints array with at least one entry
if (breakpoints && breakpoints.length) {
Copy link
Member

Choose a reason for hiding this comment

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

@thegecko the changes are similar to what I did in the past to resolve #8222 but it unfortunately did not work when multiple breakpoints are present #8746.

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, are you saying this re-introduces a regression?

Copy link
Member

Choose a reason for hiding this comment

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

OK, are you saying this re-introduces a regression?

No :) Just saying that it doesn't fix #8222 entirely (only fixes it for single breakpoints).

Copy link
Member Author

Choose a reason for hiding this comment

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

Aha! thanks. Just a little bit better, then. Shame

@colin-grant-work
Copy link
Contributor

This PR fixes the issue of not being able to enable/disable versified breakpoints if they have moved their location.

Is this specific to rhyming logpoints? 😄 I'll take a look later today.

Copy link
Member

@paul-marechal paul-marechal left a comment

Choose a reason for hiding this comment

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

I confirm that it fixes #8222, but only when dealing with one breakpoint. If I add more breakpoints and try to disable those, it will remove them until only one is left. Super weird.

I guess this change improves things a little bit. If you are happy with that I am not against approving and merging.

@thegecko
Copy link
Member Author

I guess this change improves things a little bit. If you are happy with that I am not against approving and merging.

Yeah, its a step in the right direction, sorry it wasn't the golden bullet we'd hoped for. Shall we get it in?

@paul-marechal paul-marechal merged commit 76f74f1 into eclipse-theia:master May 14, 2021
@thegecko thegecko deleted the fix-disabled-breakpoints branch May 14, 2021 16:43
@vince-fugnitto vince-fugnitto added this to the 1.14.0 milestone May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application debug issues that related to debug functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants