You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Breakpoints don't work until after reload on macOS + iOS Simulator #357
Tried to add a few more breakpoints + hit Restart => nothing happened
Tried to add a few more breakpoints + change a widget + hit Restart => this error:
Lost connection to device.
Runner(23447,0x70000c83c000) malloc: *** error for object 0x600000059bc0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
And then after that, restarted the app, changed another string, hit restart, and now breakpoints are triggering! It seems something doesn't quite work on the first breakpoint sync?
@mit-mit Thanks for testing! Could you try a few things for me?
Set dart.flutterRunLogFile and dart.observatoryLogFile to paths for logging (currently, the folders must exist, the files do not) to enable blogging of comms with flutter and observatory
After launching the app when the breakpoints don't work (before reloading or trying to fix), open the flutter run log file and find the port number for Observatory and connect to it in your browser and find the path that the VM believe the files live in
My guess is that there's a mismatch in the paths that Dart Code got from your local machine and what the VM thinks (similar to #336, though that was post-reload that was wrong).
If you can provide me the path that Dart Code actually sent (this will be in the addBreakpoint calls in the Observatory log) and what the VM thinks (you can get this from Observatory in the browser) and it's different I can figure out how to change.
@mit-mit I'm up and running on Mac OS now and I can't repro this. However, I do have some similar issues (intermittent crashes) which I think are unrelated to Dart Code, eg.:
I don't think this is a Dart Code issue so I'm going to raise at flutter.
Gonna close this since I can't repro and you haven't confirmed if you're still seeing it, but feel free to shout if you think there's still something wrong here.
@mit-mit Thanks for investigating! I've managed to get up and running on Mac OS now but so far only with Android; I'm hoping to get iOS emulator working this week so I'll investigate again.
There is an issue with Flutter on iOS (#358) which I presume you're not hitting; I don't think it's related since you'd see a frozen black screen.
If I'm unable to repro, I might ask if you could enable dart.flutterRunLogFile and dart.observatoryLogFile (see CONTRIBUTING.md#enable-logging) and repro and attach the logs.
changed the title [-]Cannot get breakpoint to work on macOS[/-][+]Breakpoints don't work until after reload on macOS + iOS Simulator[/+]on Jul 17, 2017
Looks like the problem is that I'm sending file:/// for the script URI, but the VM doesn't have it. Similar to flutter/flutter#11040 there seems to be some confusion about the format of URIs :(
The workaround for the above issue seems to not trigger here because of this if statement.. Probably the last two lines of that if condition need dropping outside the if so that they always apply, not just in the case of the remapped paths.
Out of time for tonight, but I'll see if I can get this fixed on Thursday. Thanks for the help tracking it down and providing repro steps! :-)
Couldn't go without at least testing it! Slight refactor and it's working fine for me. Hope to push a new release out on Thurs. In the meantime, a workaround is to just hit Hot Reload immediately after launching (sorry that doesn't help with breakpoints in startup code!).
Activity
mit-mit commentedon Jul 7, 2017
And then after that, restarted the app, changed another string, hit restart, and now breakpoints are triggering! It seems something doesn't quite work on the first breakpoint sync?
DanTup commentedon Jul 7, 2017
@mit-mit Thanks for testing! Could you try a few things for me?
dart.flutterRunLogFileanddart.observatoryLogFileto paths for logging (currently, the folders must exist, the files do not) to enable blogging of comms with flutter and observatoryflutter runlog file and find the port number for Observatory and connect to it in your browser and find the path that the VM believe the files live inMy guess is that there's a mismatch in the paths that Dart Code got from your local machine and what the VM thinks (similar to #336, though that was post-reload that was wrong).
If you can provide me the path that Dart Code actually sent (this will be in the
addBreakpointcalls in the Observatory log) and what the VM thinks (you can get this from Observatory in the browser) and it's different I can figure out how to change.DanTup commentedon Jul 7, 2017
Also - I think the error you posted may be a bug in Flutter/Dart; I don't think Dart Code should be able to cause that even if it tried!
I'd still like to know if you can repro this though; it's possible the breakpoint misses are unrelated to the error posted and something I can fix.
DanTup commentedon Jul 14, 2017
@mit-mit I'm up and running on Mac OS now and I can't repro this. However, I do have some similar issues (intermittent crashes) which I think are unrelated to Dart Code, eg.:
I don't think this is a Dart Code issue so I'm going to raise at flutter.
Gonna close this since I can't repro and you haven't confirmed if you're still seeing it, but feel free to shout if you think there's still something wrong here.
mit-mit commentedon Jul 17, 2017
Sorry for the late response; I was out on vacation.
I can not repro this on Windows, or in macOs against the Android emulator. But I can still repro this on macOS against the iOS Simulator:
flutter create testappcd testappcode ._counter++;)F5+button in app=> breakpoint not triggered
title:in line 25 to have a new string+button in app=> breakpoint is triggered
DanTup commentedon Jul 17, 2017
@mit-mit Thanks for investigating! I've managed to get up and running on Mac OS now but so far only with Android; I'm hoping to get iOS emulator working this week so I'll investigate again.
There is an issue with Flutter on iOS (#358) which I presume you're not hitting; I don't think it's related since you'd see a frozen black screen.
If I'm unable to repro, I might ask if you could enable
dart.flutterRunLogFileanddart.observatoryLogFile(see CONTRIBUTING.md#enable-logging) and repro and attach the logs.[-]Cannot get breakpoint to work on macOS[/-][+]Breakpoints don't work until after reload on macOS + iOS Simulator[/+]mit-mit commentedon Jul 17, 2017
Certainly, attached! The first two include the first six repro steps leading to the not working breakpoint.
flutterRunLogFile1.txt
observatoryLogFile1.txt
The second two files include the last three with the reload.
observatoryLogFile2.txt
flutterRunLogFile2.txt
DanTup commentedon Jul 18, 2017
Ok; up and running with iOS Simulator now and I can reproduce!
Looks like the problem is that I'm sending
file:///for the script URI, but the VM doesn't have it. Similar to flutter/flutter#11040 there seems to be some confusion about the format of URIs :(The workaround for the above issue seems to not trigger here because of this if statement.. Probably the last two lines of that if condition need dropping outside the
ifso that they always apply, not just in the case of the remapped paths.Out of time for tonight, but I'll see if I can get this fixed on Thursday. Thanks for the help tracking it down and providing repro steps! :-)
DanTup commentedon Jul 18, 2017
Couldn't go without at least testing it! Slight refactor and it's working fine for me. Hope to push a new release out on Thurs. In the meantime, a workaround is to just hit Hot Reload immediately after launching (sorry that doesn't help with breakpoints in startup code!).
DanTup commentedon Jul 19, 2017
@mit-mit I've pushed out v2.2.0 with this fix in; please update and let me know if it resolves your issues!
mit-mit commentedon Jul 20, 2017
Works great in v2.2.0; thanks much!
DanTup commentedon Jul 20, 2017
Great; thanks for confirming!