Skip to content

Conversation

@vakosta
Copy link
Contributor

@vakosta vakosta commented Aug 25, 2022

What it does

Fixes: #11606
Fix an issue where debugger doesn't send breakpoints on first run.

How to test

  1. Open any project in Theia.
  2. Switch to the debugger tab.
  3. Add function breakpoint by clicking on "Add Function Breakpoint" button.
  4. Run debugger.
  5. Make sure that debugger wait for capability initialization and catches breakpoints correctly.

Review checklist

Reminder for reviewers

@vakosta vakosta marked this pull request as ready for review August 26, 2022 17:25
@msujew msujew self-requested a review September 1, 2022 14:03
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

Hey @vakosta, thank you for your first contribution 👍

A few general remarks:

  1. Please keep methods/class properties open for extension by making them protected.
  2. Emitters have a certain convention sorrounding their names. In your case it would be onDidConfigureCapabilities.

Regarding the issue at hand: While using emitters/events works fine for this issue, we can probably improve the async handling of this using the Deferred class. It should resolve once we run updateCapabilities and the exposed promise should be awaited at updateBreakpoints.

@vakosta vakosta requested a review from msujew September 7, 2022 14:39
@msujew
Copy link
Member

msujew commented Sep 9, 2022

@vakosta I'm having trouble to test this successfully, since the Node.js debugger doesn't support function breakpoints at all. What language/extension are you using to test this?

@vakosta
Copy link
Contributor Author

vakosta commented Sep 9, 2022

@msujew Language and extension are internal commercial development in the company, where I work. Unfortunately, I can't name them, because they are under NDA.

@EvilBeaver
Copy link
Contributor

EvilBeaver commented Nov 15, 2022

@msujew as an author of another debug adapter (https://marketplace.visualstudio.com/items?itemName=EvilBeaver.oscript-debug) I think this is a good fix and capabilities now should work better. What else should be done to make this PR merged?

Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

Alright, while I can't really test the changes for the specific use case (function breakpoints), I can confirm that nothing else regressed with these changes. As the change looks reasonable, I'll approve this.

@vince-fugnitto Do you think it's alright to include this change in the upcoming release or should we merge it shortly afterwards to catch potential issues?

@vince-fugnitto
Copy link
Member

@vince-fugnitto Do you think it's alright to include this change in the upcoming release or should we merge it shortly afterwards to catch potential issues?

@msujew I'd wait for right after the release since we didn't get the opportunity to test the actual functionality of the change as no plugin was provided.

@vince-fugnitto vince-fugnitto added vscode issues related to VSCode compatibility debug issues that related to debug functionality labels Nov 23, 2022
@msujew
Copy link
Member

msujew commented Nov 23, 2022

@vince-fugnitto Alright, sounds good to me 👍

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

Labels

debug issues that related to debug functionality vscode issues related to VSCode compatibility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Debugger doesn't send breakpoints on first run

4 participants