-
Notifications
You must be signed in to change notification settings - Fork 323
Breaking change in how breakpoints are handled by the debugger #334
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
I'm struggling to reproduce this; I've got this: main() {
print(getThing().length);
}
getThing() {
var result = [1, 2, 3, 4];
return result.map((v) => v / 2).toList();
} I'm putting a breakpoint on the |
It took me some tries to reproduce this as well, but this reproduces the bug:
part of test;
void doPrint() {
print('Break!');
}
library test;
part 'src/test.dart';
import 'dart:async';
import 'package:test/test.dart';
import 'package:yourpackage/test.dart';
Future main() async {
test('Test', () {
doPrint();
});
} (it doesn't reproduce the issue if you put the function directly in the primary library file) Try to break on |
@hermanbergwerf Perfect; I can repro with these files. I'll investigate! |
Ok, I ran this same test in 1.24 and 1.25 and found this.. We currently send breakpoints twice because we previously found that depending on how a file was imported, the debugger would not break on it (some discussion in #134). So the request to add breakpoints looks like this:
In 1.24, both of these breakpoints are accepted:
and when we go on to execute, we stop at the second breakpoint - the "package" version. However, here's what happens in 1.25. We send the same requests:
But here's the response:
Note that the second breakpoint (which is the one that breaks in 1.24) is the one being rejected. So, I have no idea how to fix this - the breakpoint we can't set is the one that would actually work. I'm gonna add this comment also to dart-lang/sdk#29988 because I need input from Google on how this is supposed to work. |
Looks like this has been fixed in Dart, so hopefully won't occur in any release SDKs. |
This seems fixed in SDK .dev.6.0 :-) |
Again having issues in |
I think it's best posting back in dart-lang/sdk#29988 or raising a new case there with a sample. You can get a log like I posted above by setting the |
Alright, will look into this a bit. |
@hermanbergwerf Using |
I tried as well, and had no issues with the previous repro. I am quite sure
I missed a breakpoint somewhere but I cannot find/reproduce it now. Will
post back if I find something :-)
|
@hermanbergwerf I'm just investigating an issue with breakpoints not being hit that may or may not be related - see #398. I think I know the cause and fix, but not why it's never been noticed before! |
The number of developers effectively using breakpoints might be quite low,
especially for Dart. I struggled with print/printf/console.log for years
because no one had told me I should use breakpoints haha. Maybe people have
noticed and not reported though.
…On Mon, Jul 31, 2017, 21:27 Danny Tuppeny ***@***.***> wrote:
@hermanbergwerf <https://github.com/hermanbergwerf> I'm just
investigating an issue with breakpoints not being hit that may or may not
be related - see #398 <#398>.
I think I know the cause and fix, but not why it's never been noticed
before!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#334 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEQJ1Y-fsHHWzpagiTC2Y7swjLaUA1MPks5sTdZKgaJpZM4OCxQv>
.
|
See: dart-lang/sdk#29988. I noticed that with dart 1.25.0-dev.1.0 the debugger did not pause at all breakpoints (in particular some inside a closure, where I did not experience any issues previously). It seems that something was updated in the SDK and something has to be fixed in this plugin.
The text was updated successfully, but these errors were encountered: