阻止节点调试打开新浏览器 window
Stop node-debug from opening a new browser window
命令:
node-debug sls offline
每次 运行 打开一个新浏览器 window。
我们如何阻止它每次都打开一个新的 window?我想重用现有的 window!
这是节点检查器的一个已知问题。看看here.
Since 0.9.0 we use https://github.com/benderjs/browser-launcher2 to
start the browser, and make sure it's Chrome/Chromium/Opera (i.e. the
browsers that can properly render node inspector; we detect installed
browsers in the system and choose the most appropriate one; earlier we
used opener module which just delegated opening the browser to the OS,
which would open the defaul browser, which could have been e.g.
Firefox) and this could be the reason why the behavior has changed.
browser-launcher2 actually does a bit more than just launching a
browser, for instance it creates a new profile for Chrome in a
subfolder of ~/ - this is probably the issue that @CalvinScott
reported (i.e. Chrome that was opened was the new profile created by
browser-launcher, not your original profile; you should be able to
open your original profile of Chrome normally)
此外,您可以考虑 this:
Since version 6.3, Node.js provides a buit-in DevTools-based debugger
which mostly deprecates Node Inspector, see e.g. this blog post to get
started. The built-in debugger is developed directly by the
V8/Chromium team and provides certain advanced features (e.g.
long/async stack traces) that are too difficult to implement in Node
Inspector.
命令:
node-debug sls offline
每次 运行 打开一个新浏览器 window。
我们如何阻止它每次都打开一个新的 window?我想重用现有的 window!
这是节点检查器的一个已知问题。看看here.
Since 0.9.0 we use https://github.com/benderjs/browser-launcher2 to start the browser, and make sure it's Chrome/Chromium/Opera (i.e. the browsers that can properly render node inspector; we detect installed browsers in the system and choose the most appropriate one; earlier we used opener module which just delegated opening the browser to the OS, which would open the defaul browser, which could have been e.g. Firefox) and this could be the reason why the behavior has changed.
browser-launcher2 actually does a bit more than just launching a browser, for instance it creates a new profile for Chrome in a subfolder of ~/ - this is probably the issue that @CalvinScott reported (i.e. Chrome that was opened was the new profile created by browser-launcher, not your original profile; you should be able to open your original profile of Chrome normally)
此外,您可以考虑 this:
Since version 6.3, Node.js provides a buit-in DevTools-based debugger which mostly deprecates Node Inspector, see e.g. this blog post to get started. The built-in debugger is developed directly by the V8/Chromium team and provides certain advanced features (e.g. long/async stack traces) that are too difficult to implement in Node Inspector.