Thank you for the response, Søren.

1) I was getting "ReferenceError" displayed in the D8 instance running
as the debugger when trying to set a function:line breakpoint for a
script that had not yet been compiled.  I just performed your example
with the two D8 instances, and when doing "b bogusfile:123" in the
debugger and "load("fileWhichExists.js")" in the debuggee, I got the
behavior you expect (i.e. breakpoint set, no ReferenceError).  I will
try to create a standalone example which illustrates the
ReferenceError behavior I'm seeing, but it might take me a while given
my schedule.

2) So let's say I have two scripts:

Foo.js:
  function foo() {
    a = "Hello";
    b = a + ", World";
  }
  foo();

Bar.js:
  function bar() {
    c = "dlroW ,";
    d = c + "olleH";
  }
  bar();

Now in my debugee process, I enable the agent (with wait_for_connect =
true) and set up the debug message callback hander.  I create
GlobalTemplate1 and Context1, compiling and running Foo.js, and a
separate GlobalTemplate2 and Context2, compiling and running Bar.js.

Then I run a D8 debugger, and issue the following:
  dbg> b Foo.js:3
  dbg> b Bar.js:3
  dbg> continue

My intent is to "print a" in D8 to see the value of "a"  in Foo.js in
D8 when breakpoint #1 hits, and "print c" to see the value of "c" in
Bar.js when breakpoint #2 hits.

What can I do in my debugee to ensure that the appropriate context
(either 1/Foo or 2/Bar) is active when the corresponding "print
<whatever>" statement is evaluated?  Is there some "breakpoint hit"
message I can react to which contains enough contextual information
for me to determine which context needs to be activated prior to
calling ProcessDebugMessages()?

3) The issue 854 you opened should fix D8 when run as a debugee, but
our own application/debugee was already doing that.  As with (1)
above, I'll have to investigate further and try to provide a sample.

Cheers,
David

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

Reply via email to