From 681ff221400d2def989cb85f11f32e91ebec3ac6 Mon Sep 17 00:00:00 2001 From: MicroCheapFx Date: Wed, 22 Nov 2017 22:15:49 +0100 Subject: [PATCH] Changed --debug to --inspect in node args --- README.md | 4 ++-- lib/debugger.coffee | 2 +- spec/src/debugger-spec.coffee | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ee7271c..be61520 100644 --- a/README.md +++ b/README.md @@ -71,13 +71,13 @@ This is the strategy being used: Start your node application in debug mode using ```Batch ->node --debug=5858 a.js +>node --inspect=5858 a.js ``` or ```Batch ->node --debug-brk=5858 a.js +>node --inspect-brk=5858 a.js ``` Make sure that your node-debugger settings for debugHost and debugPort are diff --git a/lib/debugger.coffee b/lib/debugger.coffee index 6310f55..c678520 100644 --- a/lib/debugger.coffee +++ b/lib/debugger.coffee @@ -53,7 +53,7 @@ class ProcessManager extends EventEmitter args = [] args = args.concat (nodeArgs.split(' ')) if nodeArgs - args.push "--debug-brk=#{port}" + args.push "--inspect-brk=#{port}" args.push dbgFile args = args.concat (appArgs.split(' ')) if appArgs diff --git a/spec/src/debugger-spec.coffee b/spec/src/debugger-spec.coffee index 1ab3348..33c6ca7 100644 --- a/spec/src/debugger-spec.coffee +++ b/spec/src/debugger-spec.coffee @@ -35,9 +35,9 @@ describe 'ProcessManager', -> waitsForPromise () -> manager.start().then () -> expect(childprocess.spawn).toHaveBeenCalled() - # expect(childprocess.spawn).toHaveBeenCalledWith('/path/to/node', ['--debug-brk=5860', '/path/to/file.js', '--name', { detached : true }]) + # expect(childprocess.spawn).toHaveBeenCalledWith('/path/to/node', ['--inspect-brk=5860', '/path/to/file.js', '--name', { detached : true }]) # cannot get the toHaveBeenCalledWith to match the arguments so this method is used instead to verify the call expect(childprocess.spawn.mostRecentCall.args[0]).toEqual('/path/to/node') - expect(childprocess.spawn.mostRecentCall.args[1][0]).toEqual('--debug-brk=5860') + expect(childprocess.spawn.mostRecentCall.args[1][0]).toEqual('--inspect-brk=5860') expect(childprocess.spawn.mostRecentCall.args[1][1]).toEqual('/path/to/file.js') expect(childprocess.spawn.mostRecentCall.args[1][2]).toEqual('--name')