Skip to content

Commit

Permalink
Update debug -> inspect
Browse files Browse the repository at this point in the history
Current node versions don't accept `--debug` and `--debug-brk` anymore without complaints, and current version debuggers pass `--inspect` and `--inspect-brk` anyway. The change solves the problem reported in #242, but I have not tested the functionality that was presumably intended by the original author.
  • Loading branch information
oliversturm authored Jul 3, 2018
1 parent b8f3cf6 commit f16e6c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/highlight/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ var Promise = require('bluebird');
var init = Promise.resolve();
var opts = minimist(process.execArgv);
var forkOpts = {silent: false};
if (['debug', 'debug-brk'].some(function (opt) { return opt in opts; })) {
if (['inspect', 'inspect-brk'].some(function (opt) { return opt in opts; })) {
init = init
.then(require('get-random-port'))

This comment has been minimized.

Copy link
@cancerberoSgx

cancerberoSgx May 2, 2019

Heads up! if I'm using editor-widget as a library in my own blessed program, and I run it with node --debug-brk, then this line throws if I don't have get-random-port installed as dependency in my project.

.then(function (port) { forkOpts.execArgv = ['--debug=' + port]; })
.then(function (port) { forkOpts.execArgv = ['--inspect=' + port]; })
.return(null);
}

Expand Down

0 comments on commit f16e6c7

Please sign in to comment.