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

breakpoints in multi-line strings don't break #17039

Closed
devoncarew opened this issue Feb 21, 2014 · 15 comments
Closed

breakpoints in multi-line strings don't break #17039

devoncarew opened this issue Feb 21, 2014 · 15 comments
Assignees
Milestone

Comments

@devoncarew
Copy link
Member

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");
}

@iposva-google
Copy link
Contributor

Added Accepted label.

@DartBot
Copy link

DartBot commented Feb 21, 2014

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");

@DartBot
Copy link

DartBot commented Feb 22, 2014

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.

@DartBot
Copy link

DartBot commented Feb 28, 2014

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.

@devoncarew
Copy link
Member Author

Thanks, I'll verify that we're doing the right thing with this info.


Set owner to @devoncarew.
Removed Priority-Unassigned, Area-VM labels.
Added Priority-Medium, Area-Editor, Triaged labels.

@clayberg
Copy link

clayberg commented Mar 4, 2014

Added this to the 1.3 milestone.

@clayberg
Copy link

clayberg commented Apr 9, 2014

Removed this from the 1.3 milestone.
Added this to the 1.4 milestone.

@kasperl
Copy link

kasperl commented May 8, 2014

Removed this from the 1.4 milestone.
Added this to the 1.5 milestone.

@kasperl
Copy link

kasperl commented Jun 4, 2014

Removed this from the 1.5 milestone.
Added this to the 1.6 milestone.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the 1.6 milestone.
Added Oldschool-Milestone-1.6 label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-1.6 label.

@sethladd
Copy link
Contributor

Added Editor-Debugging label.

@clayberg
Copy link

cc @scheglov.

@scheglov
Copy link
Contributor

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.
Set owner to @scheglov.
Added Fixed label.

@clayberg
Copy link

Added this to the 1.7 milestone.

This issue was closed.
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

7 participants