Is there any way to load files to Chrome when debugging node scripts

Viewed 555

Currently it's possible to debug node scripts using Chrome as described here. However, if I run like this:

node --inspect --debug-brk myscript 

It will only load myscript to the browser and I'll be able to put breakpoints in this file. But suppose that myscript requires anotherscript and I want to put a breakpoint in this script. I don't see how this can be done since Chrome inspector only loaded myscript.

Is there any way to load a file into Chrome inspector before this files is required in the script and Chrome loads it by itself?

I'm currently modifying sources and put debugger; statement there which works. But I was thinking that should be something more apt for this purpose.

1 Answers
Related