-
Notifications
You must be signed in to change notification settings - Fork 218
Tests with breakpoint set being skipped when using --pause-after-load #409
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
Comments
If this problem went away by not needing to use --pause-after-load for debugging, that would be wonderful. From a user's perspective it's an awkward hack at best. |
Actually it's only a hack as far as I know. This is because of limitations in the VM and pub which prevented attaching a debugger for code run with |
It's a bit difficult to convince my developers that TDD (or even unit tests) is a good thing when there hasn't been a reasonable debugging story since they moved to "pub run". |
For me the easiest workaround is to create a copy of the xxx_test.html file and replace the As mentioned it is a hack and will be fixed, but there were quite some complications and dependencies from what I saw while following the discussions. This is why it take longer than expected. |
I can't reproduce this with Dartium 1.14.2, but I can with Dartium 1.15.0. I'm pretty sure it's a bug in Dartium or Observatory—I suggest you re-file this against the sdk. I'm surprised to hear you say that |
Maybe have something that works within the IDE? With --pause-after-load I have to dig through my source and reset breakpoints every run. I don't think I've had to do that in any other environment (going back to Borland C). |
This is still a problem. Why was this closed? |
nex3 wanted it filed against the SDK team -- dart-lang/sdk#26080. If this ends up ping-ponging between the teams, I'll be even less happy than I am now. |
IDE integration is something to bring up with IDE authors. I can only make the test runner as usuable as possible from the command line; how other tools integrate with it is up to them.
In 0.12.7 we added support for iterative debugging. When you're paused for debugging, there's a console available on the command line that allows you to re-run tests while keeping breakpoints intact. |
And that is documented where? I've found references to it's existence, On 3/23/16 3:19 PM, Natalie Weizenbaum wrote:
|
In the "Debugging" section of the README:
|
If you're using Atom without an integrated debugger then this might be fine. Anyway, I got the impression this is still an open task that needs to be fixed. I don't know where the missing parts are.
So are you saying that IDE integrated debugging of console and browser tests is not blocked by issues with |
This is true for browser tests, but all debugging of console tests is blocked. See #50. |
So is there any hope for this getting resolved? It's a bit hard for me I agree with Gunter that while the --pause-after-load option works (in On 3/24/16 11:42 AM, Natalie Weizenbaum wrote:
|
I hope so, but I can't speak for the IDE integration folks. I'm sure they'd appreciate knowing that this is important to you, although they'd also probably appreciate it in a friendlier tone than you've used here. |
@nex3 thanks a lot for your explanation 👍 |
I apologize if my frustration came through. I have 10-15 developers that I'm trying to get started with TDD in our Dart code. After playing with @zoechi 's suggestion a bit, I found that both script tags can coexist in the .html file, allowing for IDE debugging as a "standard" web page and have "pub run test" work -- <!DOCTYPE html>
<html>
<head>
<link rel="x-dart-test" href="file_to_be_tested_test.dart" />
<script src="packages/test/dart.js"></script>
<script type="application/dart" src="file_to_be_tested_test.dart"></script>
</head>
<body>
<!-- any html that may be needed for testing can be inserted here -->
</body>
</html> |
I'm pleased that you're unblocked, but be aware that you're using |
@TimIrwin26 yeah that workaround is actually a hack ;-) (until WebStorm provides better support). |
When attempting to debug unit tests running on either content-shell or Dartium, any group where I set a breakpoint in one of the tests using browser developer tools ends up skipped.
In the second test run, I set a breakpoint in one of the tests during the "pause-after-load" using Chrome developer tools. The tests run fine if "--pause-after-load" is used with no browser breakpoints.
pubspec.yaml.txt
some_test.dart.txt
The text was updated successfully, but these errors were encountered: