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

Tracking bug for re-establishing breakpoints in debuggers #7231

Closed
16 tasks done
elliette opened this issue Feb 15, 2024 · 1 comment
Closed
16 tasks done

Tracking bug for re-establishing breakpoints in debuggers #7231

elliette opened this issue Feb 15, 2024 · 1 comment
Assignees
Labels
screen: debugger Issues with the Debugger screen

Comments

@elliette
Copy link
Member

elliette commented Feb 15, 2024

Spinning this off of dart-lang/webdev#2257, although this issue involves work for other systems besides DevTools. But I would like everything to be tracked in one place.

This all began because on web we were experiencing an issue of "phantom breakpoints" where a breakpoint that a user had removed was still being hit in Chrome, see dart-lang/webdev#2257. We would like to remove that behavior and have the debugging clients be the source of truth for breakpoints. However, while DAP clients re-establish breakpoints on hot-restart, DevTools does not.

On further investigation, we discovered that breakpoints set along the app's initial startup path in DevTools and in DAP clients don't always get hit on hot-restart or (for web) when users refresh the page. This is because breakpoints are re-set by the debugging client after the app's isolate has already started. Therefore, we want to use a combination of:

  • set_isolates_paused_on_start - make sure the app initially starts out paused
  • requirePermissionToResume(onPauseStart: true) - make sure that all connected debugging clients using set_isolates_paused_on_start send resume event before resuming
  • debugging clients send resume after they have set breakpoints

Therefore, the work required here:

Note: the following needs to be done before rolling unpinning DWDS and rolling it into google3. It was pinned here: dart-lang/sdk@4642c73

In DWDS:

In DevTools:

In DDS:

Note: This can be done after rolling DWDS into google3

In Flutter Engine:

In DAP:

  • Set requirePermissionToResume and requireUserPermissionToResume for onPauseStart and onPauseExit so that DDS waits for DAP's permission before resuming the isolate (DONE: dart-lang/sdk@93556ae)

Make sure pause_isolates_on_start is respected for hot-restarts and page refreshes for web (changes required in multiple locations):

@elliette elliette added the screen: debugger Issues with the Debugger screen label Feb 15, 2024
@elliette elliette self-assigned this Feb 15, 2024
@elliette elliette changed the title Tracking bug for various breakpoint improvements Tracking bug for re-establishing breakpoints in debuggers Feb 15, 2024
@elliette
Copy link
Member Author

Since this requires coordination across multiple debugging clients, it makes sense to pin DWDS in g3 until everything is ready to land.

copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue Feb 28, 2024
Bug: flutter/devtools#7231
Change-Id: I26b791e2f71aa8f696c65ff9a84f41f4b01e2a75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354782
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Elliott Brooks <elliottbrooks@google.com>
copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue Apr 8, 2024
…nd pause-isolates-on-exit flags

Bug: flutter/devtools#7231
Change-Id: I4665cce72ad9b505cbf513ea151698d5de4eb3f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/360441
Commit-Queue: Elliott Brooks <elliottbrooks@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue Apr 18, 2024
…ain is provided

Bug: flutter/devtools#7231
Change-Id: Iebd1caa62cff4f41a226d7214c7a8ae330ed02c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355880
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Elliott Brooks <elliottbrooks@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
screen: debugger Issues with the Debugger screen
Projects
None yet
Development

No branches or pull requests

1 participant