Status: New
Owner: ----
New issue 1820 by [email protected]: Suggestion: Flag to prevent
breakpoint relocation across source lines
http://code.google.com/p/v8/issues/detail?id=1820
Currently v8 does automatically relocate line breakpoints to the
next 'breakable' position. However, in the project I'm working on (Qt
Quick/QML) we're not passing code at once to v8, but gradually add methods
to the source v8 sees. This leads to unexpected results when it comes to
breakpoints:
EXAMPLE
The user has written following script:
a = 0 // line 0
function g() { // line 1
return 1; // line 2
} // line 3
function f() { // line 4
return 0; // line 5
} // line 6
and sets a breakpoint on line 2. However, what v8 gets at the start is the
following:
a = 0 // line 0
// line 1
// line 2
// line 3
function f() { // line 4
return 0; // line 5
} // line 6
The breakpoint will be automatically relocated to line 5, and we'll stop at
line 5 as soon as f() is called - which is unexpected to the user, who sees
the original source code. Later on we actually pass the full script to v8,
in which case the breakpoint gets relocated again!
SUGGESTION
Add a flag to v8 that makes sure breakpoints aren't relocated across line
boundaries.
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev