dimanche 5 avril 2015

setBreakpoint on a script using a pathname

The node.js debugger documentation gives an example in which a breakpoint was placed on a file other than the file initially opened:


% ./node debug test/fixtures/break-in-module/main.js < debugger listening on port 5858 connecting to port 5858... ok break in test/fixtures/break-in-module/main.js:1 1 var mod = require('./mod.js'); 2 mod.hello(); 3 mod.hello(); debug> setBreakpoint('mod.js', 23) Warning: script 'mod.js' was not loaded yet. 1 var mod = require('./mod.js'); 2 mod.hello(); 3 mod.hello();


In this example, mod.js is in the same directory as main.js. Does anyone know if using a pathname like setBreakpoint('./path/mod.js', 23) could work? I've tried using pathnames that originate from the working directory, to no avail.


Aucun commentaire:

Enregistrer un commentaire