question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Running unit tests from the left gutter breaks debugging unit test

See original GitHub issue

Steps to Reproduce

Running the tests from the left gutter breaks. The only way to run them again is restarting IntelliJ.

  1. Set a break point in the test case
  2. Run a unit test from the left gutter run or debug button. (don’t stop debugging process)
  3. Then click on debug button in the top menu, right of the device selection. (try to start process again)

What I think is happening, when trying to start the debugging process again before it was completed while paused on a break point creates an inconsistent state. I’ve noticed an exception thrown in IDE log as well but I can’t replicate it again. What I’m finding my problem is, I forget to resume past the break point so the unit test finishes. And then I try to start it over while it’s paused, the second process doesn’t restart. Once I terminate the process, I can no longer launch another debugging instance from the left gutter button.

After a third launch of debugging I can no longer run the individual unit test from here. screen shot 2018-02-24 at 9 38 40 am

How I start it the second time, and it breaks IDE. screen shot 2018-02-24 at 9 56 47 am

How I ran it the first time. screen shot 2018-02-24 at 9 45 37 am

Version info

brandons-mbp:economy branflake2267$ flutter doctor -v
[✓] Flutter (Channel master, v0.1.5-pre.19, on Mac OS X 10.13.3 17D47, locale en-US)
    • Flutter version 0.1.5-pre.19 at /Users/branflake2267/git/flutter
    • Framework revision 37ffb2d730 (3 days ago), 2018-02-21 15:01:46 -0800
    • Engine revision ead227f118
    • Dart version 2.0.0-dev.28.0.flutter-0b4f01f759

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.2)
    • Android SDK at /Users/branflake2267/Library/Android/sdk
    • Android NDK at /Users/branflake2267/Library/Android/sdk/ndk-bundle
    • Platform android-27, build-tools 27.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)

[✓] iOS toolchain - develop for iOS devices (Xcode 9.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 9.2, Build version 9C40b
    • ios-deploy 1.9.2
    • CocoaPods version 1.4.0

[✓] Android Studio (version 3.0)
    • Android Studio at /Applications/Android Studio 3.0.app/Contents
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)

[✓] Android Studio (version 3.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)

[✓] IntelliJ IDEA Ultimate Edition (version 2017.3.3)
    • Flutter plugin version 21.1.3
    • Dart plugin version 173.4301.22

[✓] IntelliJ IDEA Community Edition (version 2017.2.6)
    • Flutter plugin version 21.1.2
    • Dart plugin version 172.4343.25

[✓] VS Code (version 1.20.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Dart Code extension version 2.8.2

[✓] Connected devices
    • Nexus 9                   • HT4ATJT00950  • android-arm64 • Android 7.1.1 (API 25)
    • Android SDK built for x86 • emulator-5554 • android-x86   • Android 8.0.0 (API 26) (emulator)

• No issues found!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
scheglovcommented, Apr 2, 2018

Just FYI, I was not able to reproduce the problem. But I can see why https://github.com/flutter/flutter-intellij/issues/1622 happens and will fix it.

0reactions
pqcommented, Apr 16, 2018

I’m unable to reproduce on tip of head either. Hopefully we should be good with the next release. Optimistically closing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Debug unit tests with Test Explorer - Visual Studio (Windows)
In Test Explorer, select the test method(s) and then choose Debug on the right-click menu.
Read more >
Debugging During Testing - PyCharm Guide - JetBrains
When writing tests, use the PyCharm "visual debugger" to interactively poke around in the context of a problem.
Read more >
Why does Run All cause a crash in VS2012 unit testing but ...
The solution, therefore, is to run all tests in debug (from the Test -> Debug menu) and Visual Studio will show errors like...
Read more >
Testing - Sourcegraph docs
To run all unit tests, run yarn test from the root directory. ... sure to set a breakpoint or break on uncaught exceptions...
Read more >
Wallaby - Immediate JavaScript test feedback in your IDE as ...
Wallaby runs your JavaScript and TypeScript tests immediately as you type in VS Code, WebStorm and other editors, highlighting results next to your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found