From 087567655a2e0a9eaf043e9a706405c01603811a Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Tue, 2 Jun 2020 15:02:54 -0700 Subject: [PATCH] fix: correctly support the --inspect-brk-node flag (#23903) --- shell/browser/node_debugger.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shell/browser/node_debugger.cc b/shell/browser/node_debugger.cc index 50e57fc9e324..cb1f27f82ae5 100644 --- a/shell/browser/node_debugger.cc +++ b/shell/browser/node_debugger.cc @@ -34,7 +34,11 @@ void NodeDebugger::Start() { std::make_shared>( debug_options.host_port), true /* is_main */)) - DCHECK(env_->inspector_agent()->IsListening()); + DCHECK(inspector->IsListening()); + + if (inspector->options().break_node_first_line) { + inspector->PauseOnNextJavascriptStatement("Break at bootstrap"); + } } void NodeDebugger::Stop() {