`node --debug` and `node --debug-brk` are invalid. Please use `node --inspect` or `node --inspect-brk` instead

All of a sudden I'm getting this when start debug on my mocha tests, why is that?

WebStorm 2017.2 EAP
Build #WS-172.2953.12, built on June 14, 2017
WebStorm EAP User
Expiration date: July 14, 2017
JRE: 1.8.0_152-release-915-b3 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.6

 

I've been running this setup forever, why would this just bomb out like that during debug in Webstorm?

 

Also when I try running the new code coverage tool, I get this:

 

49 comments
Comment actions Permalink

>In 2017.3, the 'node.js' run configuration default setting was removed which broke my debugging capabilities. Now there's only 'npm' as a run config option which doesn't allow me to point an interpreter at a javascript file.

 

Sorry, don't understand what you meant to say

 

>this option will continue to be useful for debugging ES2015 server side apps until babel-node is completely redundant. Please can you put it back?!

 

What option? Registry flag? No, we aren't going to add it.

Babel-node has NEVER been officially supported for debugging. And won't be supported in the future.

If you like to transpile ES6 code on-the-fly, please use a normal Node.js interpreter in your run configuration and pass -r babel-register as Node parameter instead.

 

0
Comment actions Permalink

The option I was referring to is the ‘node.js’ default run configuration - you now only have a ‘npm’ Run configuration in 2017.3

It is purely incidental that I was using the ‘nodejs’ run config to debug babel-node & thought that fact would be useful to other readers (because as you said, babel-node bebugging is unsupported & I have it working)

0
Comment actions Permalink

>The option I was referring to is the ‘node.js’ default run configuration - you now only have a ‘npm’ Run configuration in 2017.3

No, I'm not aware of this. Node.js run configuration is definitely available in 2017.3

0
Comment actions Permalink

Ok... well I’m on Mac high Sierra & the node.js run config default option not only disappears when I upgrade 2017.2 > 2017.3, but my saved run config becomes invalid.

Then when I downgrade again, the option reappears & my run config become valid again.

Maybe a cross platform bug?!

 

 

0
Comment actions Permalink

Might be caused by incompatible.broken Node.js plugin. Please remove ~/Library/Application Support/WebStorm2017.3 folder to start with bundled plugins - does the issue persist?

0
Comment actions Permalink

Hi Elena,

I've just removed the '~/Library/ApplicationSupport/WebStorm2017.3' folder as requested and and reinstalled a fresh 2017.3

Here's a screenshot of the run config's default options, without node.js

Also shows the broken saved node.js (unknown) > debug run config:

Thanks - Alex

 

0
Comment actions Permalink

Note the message on the right about this being based on the default settings

0
Comment actions Permalink

Please provide your idea.log (https://intellij-support.jetbrains.com/hc/en-us/articles/207241085-Locating-IDE-log-files) - don't paste it here, upload it to some file server

0
Comment actions Permalink

You want the whole log or is this line enough?? :

2018-01-19 10:41:31,284 [   1140]   INFO - llij.ide.plugins.PluginManager - Plugin 'NodeJS' can't be loaded because: Plugin since-build or until-build don't match this product's build number

 

&

 

NodeJS (172.4155.10)

0
Comment actions Permalink

As you can see, plugin is not compatible with current WebStorm version. Looks like the configuration is broken

Please remove WebStorm configuration, plugins and caches to start with fresh configuration:

rm -rf “~/Library/Preferences/WebStorm2017.3″
rm -rf “~/Library/Caches/WebStorm2017.3″
rm -rf “~/Library/Application Support/WebStorm2017.3″
rm -rf “~/Library/Logs/WebStorm2017.3″
0
Comment actions Permalink

OK - I've done that... but it made no difference.

The log above suggested there was a build version mismatch... so I re-installed the NodeJs plugin - which has fixed the problem.

I now have the run config back in 2017.3 & and am able to debug with the '-r babel-register' or via babel-node interpreter.

Thanks for your help.

0
Comment actions Permalink

Any solution? it's June 6 2018 and still can't get running debugging mode. Please help.

0
Comment actions Permalink

Sorry, what solution are you looking for? this thread includes multiple issues not always related to each other, and most of them are not the bugs that have to be addressed on IDE end.

Would you be so kind to create a new thread, providing detailed description of the problem you have faced?

 

0
Comment actions Permalink

Thank you Elena for your quick answer. The error I'm facing is this:

/Users/sebito/.meteor/packages/meteor-tool/.1.6.1_1.o8hqcq.5zvm++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/bin/node: --debug-brk=52902 is not allowed in NODE_OPTIONS

I have the latest version of WebStorm.

0
Comment actions Permalink

What are your global and local (project) meteor versions?

0
Comment actions Permalink

local: 1.6.1, global: 1.5.1

0
Comment actions Permalink

that's the issue... WebStorm checks Meteor version when starting the debugger and, depending on the result, uses different Node.js options. In your case, returned version is 1.5.1. That's why --debug-brk is used. But global version is 1.6.1 that bundles Node 8+ and thus doesn't support --debug-brk

You can override WebStorm behavior by passing --inspect in the Program Arguments of your Meteor Run configuration - but this won't work as well: Meteor will fail with --inspect: unknown option, as this option was introduced in 1.6.x, Meteor 1.5 is not aware of --inspect/--inspect-brk options. 

 

So your local and global versions conflict with each other: Node.js used to run Meteor requires debug options that are not known to your local Meteor version that is being run:( Looks as if you just can't debug meteor application when your local and global meteor versions do not match:(

0
Comment actions Permalink

Hello S Hernandez G, 

I still have that problem too, it's awful and dirty but here is my solution. Maybe it can helps :

 

Like i said I frost my meteor, so I got something like you : global 1.5.2 and local 1.7.0. And to finish I execute my code with a --release 1.3.3.1... 
Webstorm is saying to me each start :

"/home/pierre/.meteor/packages/meteor-tool/.1.7.0_1.1uzjgq7++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node: --debug-brk=34248 is not allowed in NODE_OPTIONS"

So I unlink the .meteor who is autolinked with the local meteor to reput the symlink to the local who make it works :

unlink ~/.meteor/meteor
ln -si ~/.meteor/packages/meteor-tool/1.5.2/mt-os.linux.x86_64/meteor ~/.meteor/meteor

 

This is boring, but it's working... :)

Maybe it can helps.. 

1
Comment actions Permalink

Pierre Mineaud, you are awesome, works like a charm!

Thank you so much.

0

Please sign in to leave a comment.