-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
UI not updated upon editing breakpoint condition #12546
Comments
@pisv by "UI" you mean the hover message on the breakpoint? |
I mean that UI state in general is not updated in response to the action (e.g. the breakpoint's icon). The crux of the matter is that |
It looks like a regression introduced by #12183. When a condition is set for a breakpoint, the
So, Here is the relevant call stack:
|
I could try to provide a patch, but I'm not quite sure what would be the proper way to fix the issue. One way would be to add an optional parameter to both In that way, both I have tried this approach locally, and it seems to work fine. But I'm not quite sure if it is a proper way. What do you think? |
Hmh...a "force notification" flag sounds like a code smell. Whenever we have mutable data, we need change notification in order for users of the data to react to those changes. In our case, |
@tsmaeder Thank you for your detailed comment. I has been very helpful to me. Thinking a bit more about it, it seems that the root of the issue is that the fix in #12183 introduced a significant change in behavior to the theia/packages/debug/src/browser/breakpoint/breakpoint-manager.ts Lines 62 to 84 in f0cd180
Evidently, some client code (such as Therefore, I guess there are two ways to handle the underlying issue: either adjust the client code to the new behavior of the Having said that, I must admit that I might not fully understand everything involved in the issue. |
…tion Fixes eclipse-theia#12546, which is a regression introduced by eclipse-theia#12183, by ensuring that `BreakpointManager.setMarkers` fires a `SourceBreakpointsChangeEvent` when `oldMarker === newMarker`, as there is no way to actually detect a change in this case.
…tion Fixes eclipse-theia#12546, which is a regression introduced by eclipse-theia#12183, by ensuring that `BreakpointManager.setMarkers` fires a `SourceBreakpointsChangeEvent` when `oldMarker === newMarker`, as there is no way to actually detect a change in this case.
Steps to Reproduce:
Using Theia Electron (or Browser) Example on the master branch,
add a source breakpoint in a JavaScript (or TypeScript) file.
Edit the breakpoint and set a condition (Expression or Hit Count).
Note that UI (e.g. the breakpoint's icon) is not updated after the condition is set.
Additional Information
Debugging revealed that no
SourceBreakpointsChangeEvent
is fired from theBreakpointManager.setMarkers
method upon setting breakpoint condition (step 2).See also #8851.
The text was updated successfully, but these errors were encountered: