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

Breakpoint markers are not updated when debugging starts #14096

Open
mvtec-richter opened this issue Aug 29, 2024 · 0 comments · May be fixed by #14645
Open

Breakpoint markers are not updated when debugging starts #14096

mvtec-richter opened this issue Aug 29, 2024 · 0 comments · May be fixed by #14645

Comments

@mvtec-richter
Copy link

Bug Description:

Steps to Reproduce:

  1. Install python extension
  2. Open python file
  3. Set breakpoint on comment or empty line
  4. Set breakpoint on some valid line, so execution will stop somewhere
  5. Start debugging

-> In python the breakpoint should disappear or be disabled (might be separate issue)
However the breakpoints stay at the invalid place
grafik
When adding/removing a breakpoint, the breakpoint is adapted
With another DAP server, the breakpoint might be moved to the next valid line.

The problem seems to be that in debug-session.tsx in the configure method, initialized is false, when this.updateBreakpoints is called.
updateBreakpoints will trigger an update of the UI, which calls getBreakpoints in debug-session-manager.ts. However, this returns the original breakpoints instead of the updated breakpoints from the DAP session, because the state of the session is still initializing and not running/stopped.

I could not reproduce this with the node/javascript extension, properly, because breakpoints are changed using a BreakpointEvent much later.

Additional Information

  • Operating System: Windows/Linux
  • Theia Version: 1.52.0
mvtec-richter added a commit to mvtecsoftware/theia that referenced this issue Dec 17, 2024
Previously, when starting to debug, the breakpoints did not
move to valid lines. The breakpoints were send to the debug
adapter before configurationDone and some debug adapters
(e. g. python) return updated positions directly. The updates
were not visible in the editor, because the connection was not
marked as initialized yet and events were ignored. The
updates became only visible, when changing breakpoints later.
This commit fixes this.

Fixes eclipse-theia#14096

Signed-off-by: Florian Richter <[email protected]>
@mvtec-richter mvtec-richter linked a pull request Dec 17, 2024 that will close this issue
2 tasks
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 a pull request may close this issue.

1 participant