Closed twittner closed 14 years ago
I'd like to ask if you could maybe provide a way to allow starting web workers with debug ports, e.g.:
diff --git a/lib/webworker.js b/lib/webworker.js index 95f7489..60d5701 100644 --- a/lib/webworker.js +++ b/lib/webworker.js @@ -47,7 +47,7 @@ var numWorkersCreated = 0; // // Each worker communicates with the master over a UNIX domain socket rooted // in SOCK_DIR_PATH. -var Worker = function(src) { +var Worker = function(src, debugPort) { var self = this; // The timeout ID for killing off this worker if it is unresponsive to a @@ -109,13 +109,15 @@ var Worker = function(src) { // and away we go. var start = function() { srv.addListener('listening', function() { + const dbg = debugPort ? ["--debug=" + debugPort] : [] cp = child_process.spawn( process.argv[0], + dbg.concat( [ path.join(__dirname, 'webworker-child.js'), sockPath, 'file://' + src - ], + ]), undefined, [0, 1, 2] );
Fixed in 1c25095a346bf2122d683107a0e5ea87f4482a6d.
I'd like to ask if you could maybe provide a way to allow starting web workers with debug ports, e.g.: