Skip to content

Impossible to debug failing tests #27229

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

Closed
floitschG opened this issue Sep 2, 2016 · 6 comments
Closed

Impossible to debug failing tests #27229

floitschG opened this issue Sep 2, 2016 · 6 comments
Labels
area-intellij Tracking issues for the Dart IntelliJ plugin.

Comments

@floitschG
Copy link
Contributor

floitschG commented Sep 2, 2016

I have a failing pub test, but no way to debug it.
I can find ways to run the test, but the IDE does not provide any way to set a breakpoint and debug the code. (At least I couldn't find any).

Eventually I ended up creating a new build-configuration that just executes 'dart' directly on the failing test file. That at least, gave me a way to set a breakpoint in the main of the that file, but I was unable to set a breakpoint in the package that was failing.

Update: the breakpoint not triggering is probably because Pub is running commands...
Edit: removed breakpoint screenshot.

@floitschG floitschG added the legacy-area-analyzer Use area-devexp instead. label Sep 2, 2016
@devoncarew
Copy link
Member

/cc @jwren for triage (and possibly moving to the YouTrack tracker)

@bwilkerson bwilkerson removed the legacy-area-analyzer Use area-devexp instead. label Sep 8, 2016
@anders-sandholm
Copy link
Contributor

YouTrack, area-analyzer?

@alexander-doroshko
Copy link

alexander-doroshko commented Sep 14, 2016

but I was unable to set a breakpoint in the package that was failing

@floitschG When you run test as an ordinary Dart app breakpoints should works anywhere: own code, packages and SDK. In case of file from package make sure you set breakpoint in the original file, not in its symlink from any of numerous 'packages' folders.

@alexander-doroshko
Copy link

Debugging VM tests that are started via 'pub run test' is not possible at the moment. Tracked as dart-lang/test#50 and/or dart-lang/test#459.

In my understanding the problem could also be solved by being able to pass VM options to the VM that executes tests (when starting tests via pub run test). For example this could be solved if pub run started program in a separate isolate (currently it spawns separate OS process). Related issues are dart-lang/pub#1018 and dart-lang/pub#1204.

@jwren jwren added the area-intellij Tracking issues for the Dart IntelliJ plugin. label Sep 14, 2016
@jwren
Copy link
Member

jwren commented Sep 14, 2016

Thanks @alexander-doroshko !

@alexander-doroshko
Copy link

Debugging of tests executed by the Dart VM is possible starting from IntelliJ IDEA 2017.1 (available as EAP now) and Dart SDK 1.22+.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-intellij Tracking issues for the Dart IntelliJ plugin.
Projects
None yet
Development

No branches or pull requests

6 participants