From 5db4c6a76b39f76d1bd9fa5b8c69691624abd953 Mon Sep 17 00:00:00 2001 From: Refael Ackermann Date: Sun, 23 Apr 2017 23:52:41 -0400 Subject: [PATCH] inspector: enable --inspect-brk PR-URL: https://github.com/nodejs/node/pull/12615 Reviewed-By: Sam Roberts Reviewed-By: Gibson Fahnestock Reviewed-By: James M Snell --- src/node.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/node.cc b/src/node.cc index 33d97a0fcc..def8e60b42 100644 --- a/src/node.cc +++ b/src/node.cc @@ -3616,6 +3616,15 @@ static bool ParseDebugOpt(const char* arg) { use_debug_agent = true; use_inspector = true; port = arg + sizeof("--inspect=") - 1; + } else if (!strcmp(arg, "--inspect-brk")) { + use_debug_agent = true; + use_inspector = true; + debug_wait_connect = true; + } else if (!strncmp(arg, "--inspect-brk=", sizeof("--inspect-brk=") - 1)) { + use_debug_agent = true; + use_inspector = true; + debug_wait_connect = true; + port = arg + sizeof("--inspect-brk=") - 1; #else } else if (!strncmp(arg, "--inspect", sizeof("--inspect") - 1)) { fprintf(stderr,