Skip to content

Editing breakpoint conditions does not work #15510

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

Open
Tracked by #15494
sdirix opened this issue Apr 24, 2025 · 5 comments · May be fixed by #15516
Open
Tracked by #15494

Editing breakpoint conditions does not work #15510

sdirix opened this issue Apr 24, 2025 · 5 comments · May be fixed by #15516
Assignees

Comments

@sdirix
Copy link
Member

sdirix commented Apr 24, 2025

Bug Description:

The inline breakpoint editor no longer shows up. Afterwards the breakpoint context menu is fully broken too.

Steps to Reproduce:

  1. Add a breakpoint
  2. Open the context menu for the breakpoint (right-click)
  3. Click "Edit Breakpoint..."
  4. Observe that nothing happens and no error is logged.

Afterwards the context menu for breakpoints is fully broken for this editor, i.e. it always shows

  • Add Breakpoint
  • Add Conditional Breakpoint....
  • Add Logpoint...

no matter whether you click on a breakpoint or an empty space. Executing any of the entries has no effect, i.e. no breakpoints are added.

It still works fine in the latest Theia IDE.

Additional Information

  • Operating System: Ubuntu 24.04
  • Theia Version: latest master f9631e9
@tsmaeder
Copy link
Contributor

I can reproduce the problem on Windows/1.60.200, but only when I enabling the "Editor: Enable Preview" setting.

@sdirix
Copy link
Member Author

sdirix commented Apr 24, 2025

I can reproduce the problem on Windows/1.60.200, but only when I enabling the "Editor: Enable Preview" setting.

Note that this preference is enabled by default, so most users will be affected by this

@tsmaeder
Copy link
Contributor

tsmaeder commented Apr 25, 2025

So here's what seems to be happening. The scenario is this: I have a file already open and I click on the same file a second time (doing "Edit Breakpoint" from the context menu also opens the file a "second time").

  1. Call open on the already open file
  2. A new editor widget is created.
  3. DebugEditorService listens for this and puts a DebugEditorModel under the uri of the open file into it's models map.
  4. EditorWidget.handleTabBarChange() is invoked and closes the duplicate editor widget (this is the "Editor Preview" behaviour.
  5. The DebugEditorService disposes of the model for the uri of the second widget.
  6. Since the second widget refers to the same uri, we end up without a DebugEditorModel in the model map and the breakpoint editor is not working.

@tsmaeder
Copy link
Contributor

In general, we need to handle the case where multiple editors for the same file are open simultaneously: we can trivially provoke this situation by dragging an open editor to right of the other open editors to create a "split editor" configuration.

@tsmaeder
Copy link
Contributor

Fun fact: invoking "Edit Breakpoint" on an editor reopens the editor in non-preview mode, so if you click on another file, it opens in a second tab forever after.

tsmaeder added a commit to tsmaeder/theia that referenced this issue Apr 25, 2025
Fixes eclipse-theia#15510

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <t.s.maeder@gmail.com>
@tsmaeder tsmaeder linked a pull request Apr 25, 2025 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.

2 participants