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
breakpoints in multi-line strings don't break #17039
Comments
Added Accepted label. |
This comment was originally written by @mhausner Since the debugger doesn't know the semantics of the lines, it always looks for the nearest safe point after the requested location. In this case, requesting a breakpoint on the line containing one and two and tree should all break at print("goodbye"); |
This comment was originally written by jorat...@gmail.com This problem could be related to multi line string. I couldn't reproduce in a separate project, but you can contact me and i will send you my full project in which i have the problem. So far, the problem is the worst when i have multi line string my file. I put my html file inside my dart file, so i have that problem quite often. |
This comment was originally written by @mhausner Devon, when you attempt to set a breakpoint on a line within the multiline string (e.g. on one, two or three), the VM reports back that no breakpoint can be set at this line. You also get this same error if you attempt to set a BP on a line with no tokens (empty line, or a line with only comments). The IDE could either tell the user that a breakpoint at that line is not possible, or just try setting it on the next line. Added NeedsInfo label. |
Thanks, I'll verify that we're doing the right thing with this info. Set owner to @devoncarew. |
Added this to the 1.3 milestone. |
Removed this from the 1.6 milestone. |
Removed Oldschool-Milestone-1.6 label. |
Added Editor-Debugging label. |
cc @scheglov. |
With https://codereview.chromium.org//605833002 we report an error if setBreakpoint was unsuccessful. Error: Dart_SetBreakpoint: could not set breakpoint at line 7 in 'file:///Users/scheglov/dart/test2/bin/test2.dart' cc @devoncarew. |
Added this to the 1.7 milestone. |
Breakpoints in multi-line strings don't break, and don't get moved to the next executable line. Given the example below, the declaration will break; a bp placed at the last line of the string will move to the next executable line; and breakpoints in the middle will neither break or be moved.
void main() {
print("hello");
var str = """ // bp here will break
one
two
three
"""; // bp here will move to the print() line below
// bp on lines 'one', 'two', 'three' above will not break or move the bp
print("goodbye");
}
The text was updated successfully, but these errors were encountered: