Hi, A couple of possible alternatives: - if you are only interested at function level tracing, then --trace does this - It might be a bit low-level, but you can trace every bytecode that gets executed using --trace-ignition (you also need to enable a GN build arg v8_enable_trace_ignition for this to work) - You could use the debugger and flood the code with breakpoints at every JS statement.
Hope this help. Cheers Rissy On Thu, 4 Oct 2018, 00:01 SudoKid, <speer.em...@gmail.com> wrote: > I'm looking to trace the JS as it executes and I think I'm looking in the > wrong places. > > I have read over the embedding documentation and spent a sometime both > playing around and reading over the source code to better understand the > project. I'm starting to understand parts of the code at this point though > still not most of it yet. > > What I'm trying to do is turn code like this. > > ``` > var x = "1 + "; > > var y eval(x + " 2"); > > var z = String.fromCharCode(189, 43, 190, 61); > ``` > > into something like this. > > ``` > var x = "1 + "; > > eval("1 + 2"); > var y = 3; > > String.fromCharCode(189, 43, 190, 61); > z = "½+¾="; > ``` > > With what I currently know of V8 this would require adding some kind of > print statement to every function that can be called which would in turn be > rather long and drawn out. I'm also wondering if there is some kind of > tracing system that is already part of V8 for this. > > Any suggestions or guidance would be greatly appreciated. > > -- > -- > v8-dev mailing list > v8-dev@googlegroups.com > 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 v8-dev+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- -- v8-dev mailing list v8-dev@googlegroups.com 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 v8-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.