Oh, right. Create a functiontemplate then call getfunction(debugcontext) on it and .set it on the global context.
I forgot about doing it after context creation. Thank you. On Mon, Oct 3, 2016 at 2:20 AM, Ben Noordhuis <[email protected]> wrote: > On Mon, Oct 3, 2016 at 6:57 AM, Zac Hansen <[email protected]> wrote: > > I want to print to stdout from a debug context. I've got native code I > put > > in the object template I create my normal contexts with, but how do I do > > something similar in the debug context? > > > > If that's not possible, is there something built in to it already to do > > that? > > > > Thank you. > > > > --Zac > > You can install a print function on the debug context's global object. > You can retrieve it with v8::GetDebugContext(isolate)->Global(). > > Or take a look at test/cctest/print-extension.{cc,h}. > > -- > -- > v8-users mailing list > [email protected] > http://groups.google.com/group/v8-users > --- > You received this message because you are subscribed to a topic in the > Google Groups "v8-users" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/v8-users/FNpYKepcPaE/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" 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/d/optout.
