Status: New
Owner: ----

New issue 2981 by [email protected]: debugger: breakpoints in anonymous functions don't always work
http://code.google.com/p/v8/issues/detail?id=2981

Test case:

  function f(g) { g() }
  f.f = f;  // comment this out to make it work
  f(function() {
    return f;  // put breakpoint here
  });

If you set the breakpoint before control reaches line 2, then the breakpoint is never hit. If you set it afterwards, it works. Naming the function or putting a debugger statement inside also fixes it. Tested with node.js v0.11.9-pre 962686b with V8 3.21.18.3.

The command that node.js sends is '{"command":"setbreakpoint","arguments":{"type":"scriptId","target":"36","line":3}}' (where the script ID matches the file that's being debugged.)

I couldn't check V8 HEAD because the following happens when compiled with extrachecks=on i18nsupport=off:

$ out/x64.debug/d8 --debugger t.js
JavaScript debugger enabled


#
# Fatal error in ../src/api.h, line 402
# CHECK(that == __null || !(*reinterpret_cast<v8::internal::JSObject**>( const_cast<v8::Object*>(that)))->IsFailure()) failed
#

==== C stack trace ===============================

 1: ??
 2: ??
 3: ??
 4: ??
 5: ??
 6: ??
 7: ??
 8: ??
 9: ??
10: ??
11: ??
12: ??
13: ??
14: ??
15: ??
16: ??
17: ??
18: ??
Trace/BPT trap: 5

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to