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

main isolate is paused in the debugger #2870

Closed
matthewchung74 opened this issue Apr 6, 2021 · 11 comments
Closed

main isolate is paused in the debugger #2870

matthewchung74 opened this issue Apr 6, 2021 · 11 comments

Comments

@matthewchung74
Copy link

I get this error when flutter web

Screen Shot 2021-04-06 at 1 47 10 PM

not that it matters, but have tried using vscode

        {
            "name": "Flutter",
            "request": "launch",
            "type": "dart",
            "args": ["-d", "chrome","--web-port", "9000", "--web-enable-expression-evaluation"],
        }

and command line too

flutter run  -d chrome --web-port 9000
flutter doctor -v
[✓] Flutter (Channel stable, 2.0.4, on Mac OS X 10.15.7 19H114 darwin-x64, locale en-US)
    • Flutter version 2.0.4 at /Users/mattc/flutter
    • Framework revision b1395592de (5 days ago), 2021-04-01 14:25:01 -0700
    • Engine revision 2dce47073a
    • Dart version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/mattc/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.4, Build version 12D4e
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.55.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.21.0

[✓] Connected device (2 available)
    • iPhone 12 Pro Max (mobile) • 28DA59A2-DEEB-4FD9-AC8B-86A0024DFC74 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
    • Chrome (web)               • chrome                               • web-javascript • Google Chrome
      89.0.4389.114

• No issues found!
@kenzieschmoll
Copy link
Member

kenzieschmoll commented Apr 6, 2021

That is a floating toolbar intended to notify you when your app is paused at a breakpoint. Some parts of DevTools will not work when your app is paused. If you click the green resume button, your app should resume and DevTools should work as intended.

@matthewchung74
Copy link
Author

@kenzieschmoll thanks for replying. I have tried that many times, and it inconsistently works. now sure how to get more diagnostics on the problem.

@kenzieschmoll
Copy link
Member

do you have a breakpoint that keeps getting hit? Can you switch to the debugger tab to resume?

@matthewchung74
Copy link
Author

I've been trying to get a video of it happening, but of course, it is working now. While I had breakpoints set in vscode, none of them were hit. When I pressed the green button on the floating toolbar, nothing happened.

@matthewchung74
Copy link
Author

@kenzieschmoll i do have a video capturing it, but am not sure if it will be helpful at all. there are no breakpoints which are pausing execution and I do hit the green go button a couple times.

Screen.Recording.2021-04-06.at.5.25.19.PM.mov

@kenzieschmoll
Copy link
Member

It's hard to tell from the video, but has your app completely finished launching from VS code?
cc @DanTup

@DanTup
Copy link
Contributor

DanTup commented Apr 7, 2021

The Chrome window shows an "Awww, snap!" error, which may be related. Do you have part files in this project? There's an issue being looked at at dart-lang/webdev#1271 related to that causing problems.

@annagrin
Copy link
Contributor

annagrin commented Apr 7, 2021

@DanTup thanks for referencing! I do suspect it is related to one of two problems that are going to be fixed in dart-lang/webdev#1296:

  • failing to set breakpoints in part files
  • data race if more than one breakpoint was set in the same file, with more breakpoints making it more likely to happen.

@matthewchung74 do you see the same issue if there is only one breakpoint in your app, in main (and no breakpoint in any part files)?

@matthewchung74
Copy link
Author

@DanTup not deliberately using any part files. i am importing a number of firebase libraries and riverpod, might be used in there? I uploaded the repo : https://github.com/matthewchung74/flutter_debug . it's just the start of a flutter web project using firebase email magic link.

@annagrin it's not happening right now, but once it does, I'll try to reproduce with 1 breakpoint in main. I did notice last night when I shut down on my mac, there were a couple chrome processes that were unresponsive and difficult to kill.

@matthewchung74
Copy link
Author

matthewchung74 commented Apr 13, 2021

It happened to me a couple of times over the week, although I haven't been able to isolate it. Each time, I had a lot of breakpoints set. I did notice if I removed all my breakpoints, the issue went away.

@matthewchung74
Copy link
Author

i can close this for now, and if I find a way to reproduce, will reopen.

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

No branches or pull requests

4 participants