Debugging node 11 with Webstorm 2017.1?

I'm using Webstorm 2017.1 and am no longer able to debug node.js application. The behaviour is that the application breezes past breakpoints and completes as if no breakpoints were created.

When webstorm runs the app, it passes `--inspect-brk` to the node application, eg:

`/usr/local/bin/node --inspect-brk=50377 /Users/me/path/to/somescript.js`

I then get this ouput in my webstorm console:

```
Debugger listening on ws://127.0.0.1:50377/447aee21-4919-4044-a5ac-9bd1651abe54
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
THIS IS OUTPUT FROM THE APP - THE APP IS STARTING
Waiting for the debugger to disconnect...
THIS IS OUTPUT FROM THE APP - THE APP IS RUNNING
THIS IS OUTPUT FROM THE APP - THE APP IS FINISHED AND IS CLOSING
Process finished with exit code 0
```

I believe `inspect-brk` is the correct param for webstorm to use for Node 11, and it appears to be using it correctly... Any ideas???

3 comments

>Any ideas???

Sure - you can't expect the IDE released 2 years ago to work with new Node.js versions, it's debugger implementation is not compatible with recent V8 changes. You have to either upgrade the IDE or downgrade Node.js to version 6

0

I didn't intend to give the impression that I expect my 2017 IDE to work out of the box with every future version of Node. I certainly don't have that expectation. Looking at the specifics and ignoring loose generalizations, it appears that something very minor is off and some configuration could probably get me going. I expect somebody out there has already solved this.

The specifics

  • My debugger _does_ successfully attach (see the output above)
  • If I put the line `debugger;` anywhere in my code, the IDE does successfully pick up on that forced breakpoint and all normal debugging behavior is available to me

It simply isn't successfully breaking at the usual "red dot" breakpoints I set in my IDE UI. It attaches fine, but misses the breakpoints.

IDEs are often made flexibly enough to be reconfigured to work with future versions. Webstorm in particular has proven this. This is what I'm trying to assess now. If you don't have anything helpful to offer that's certainly fine :)

0

I can't offer any workaarounds, sorry:(

0

Please sign in to leave a comment.