Comment #2 on issue 1080 by [email protected]: Breakpoint is set in wrong position
http://code.google.com/p/v8/issues/detail?id=1080

Testing this in the D8 command line debugger seems to work OK.

test.js contains:

function g() {}

function h() { if (true) var x = 0; g(); }

Stepping using D8:

sgjesse@dora:/usr/local/google/home/sgjesse/v8/edge/bld$ ./d8_g --debugger test.js --shell
V8 version 3.1.1 (candidate) [console: dumb]
JavaScript debugger enabled
d8> debugger
break in [anonymous](), (d8) line 1 column 1
debugger
^
dbg> b h
set breakpoint #1
dbg> c
(running)
d8> h()
breakpoint #1 in h(), test.js line 3 column 16
function h() { if (true) var x = 0; g(); }
               ^
dbg> n
(running)
break in h(), test.js line 3 column 26
function h() { if (true) var x = 0; g(); }
                         ^
dbg> n
(running)
break in h(), test.js line 3 column 37
function h() { if (true) var x = 0; g(); }
                                    ^
dbg> n
(running)
break in h() returning undefined, test.js line 3 column 42
function h() { if (true) var x = 0; g(); }
                                         ^
dbg>


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to