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

Can't set breakpoint in test #30136

Closed
NevRA opened this issue Jul 11, 2017 · 3 comments
Closed

Can't set breakpoint in test #30136

NevRA opened this issue Jul 11, 2017 · 3 comments

Comments

@NevRA
Copy link

NevRA commented Jul 11, 2017

I can't set breakpoint in Dartium in below code:

@TestOn("browser")
import 'package:test/test.dart';

void main() {
  group('simple tests', () {
    test("2+2", () {
      expect(2+2, 4);
    });
  });
}

It worked fine in 1.21 but since 1.23+ (maybe 1.22 too) it doesn't work.

To confirm:

  1. serve project: pub serve test --port 8081
  2. run test with pause: pub run test -p dartium --pub-serve=8081 test/app_test.dart --pause-after-load
  3. try to set breakpoint in Dartium on line: expect(2+2, 4); and release pause in Dartium

P.S. Breakpoints in regular code works perfect.
P.P.S Issue related only for browser tests, vm tests works ok.

@avilladsen
Copy link

I've run into the same issue. I'm on Dart 1.24.2 with Dartium 50. Setting breakpoints works as expected in Chrome (version 61 beta).

Could this be a regression of #26080?

While unsuccessfully trying to find a way around it, I made a demo for this issue if that's helpful.

@zoechi
Copy link
Contributor

zoechi commented Aug 16, 2017

Adding a print('xxx'); and setting a breakpoint there often works for me when other breakpoints don't work. I know, an ugly hack, but it helps to unblock.
Dartium is going away anyway.

@avilladsen
Copy link

No luck with the print('xxx'); trick.
Fair point that Dartium is going away. I'd be happy to move away from it as soon as I can replace content_shell with headless chrome (waiting on dart-lang/test#391).

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

5 participants