aboutsummaryrefslogtreecommitdiff
path: root/src/node.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/node.js')
-rw-r--r--src/node.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/node.js b/src/node.js
index e7b45ad5cc..19d9506446 100644
--- a/src/node.js
+++ b/src/node.js
@@ -56,7 +56,10 @@
startup.processKillAndExit();
startup.processSignalHandlers();
- startup.processChannel();
+ // Do not initialize channel in debugger agent, it deletes env variable
+ // and the main thread won't see it.
+ if (process.argv[1] !== '--debug-agent')
+ startup.processChannel();
startup.processRawDebug();
@@ -80,6 +83,11 @@
var d = NativeModule.require('_debugger');
d.start();
+ } else if (process.argv[1] == '--debug-agent') {
+ // Start the debugger agent
+ var d = NativeModule.require('_debugger_agent');
+ d.start();
+
} else if (process._eval != null) {
// User passed '-e' or '--eval' arguments to Node.
evalScript('[eval]');