Skip to content
This repository has been archived by the owner on Dec 19, 2022. It is now read-only.

#234 #242 Changed --debug to --inspect in node args #246

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/debugger.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions spec/src/debugger-spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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')