Getting Node.js 8 debugging to work

ide
runner
debug
nodejs
workspace

#1

Hello!

I’m trying to use node.js 8 with the debugger but I can’t seem to get it to work. I’ve used nvm to install v8.1.0 and created my own runner file:
{
“cmd”: [
“bash”,
"–login",
"-c",
“nvm use v8.1.0 > /dev/null; node ${debug?–nocrankshaft --nolazy --nodead_code_elimination --inspect=15454} ‘$file’ $args”
],
“debugger”: “v8”,
“debugport”: 15454,
“selector”: “source.js”,
“info”: “Your code is running at \033[01;34m$url\033[00m.\n\033[01;31mImportant:\033[00m use \033[01;32mprocess.env.PORT\033[00m as the port and \033[01;32mprocess.env.IP\033[00m as the host in your scripts!\n”
}

The debug icon shows up, but I can’t get breakpoints/debugging to work correctly.

Any help would be appreciated!


#2

I just upgraded to version 8.1.2 and am getting this error…

(node:14799) [DEP0062] DeprecationWarning: node --debug and node --debug-brk are invalid. Please use node --inspect or node --inspect-brk instead.


#3

Unfortunately the debugger api of node have been completely changed in version 8, we are working on adding support for the new api, but it will take some time.


#4

Hí!
you should downgrade your nodejs to 7.0.0 or less.
Use NVM on windows, see this post --> https://medium.com/appseed-io/how-to-run-multiple-versions-of-node-js-with-nvm-for-windows-ffbe5c7a2b47

you can have several node´s version, on your computer.

luck!


#5

@harutyun Has this been fixed yet? I have a module that requires node 8.


#6

You can still use Node.js 8, but you just won’t be able to debug it using the built-in Cloud9 debugger. Because the runner isn’t updated and will usually error, you’re best off just using the command line and running node myfile.js.


#7

@dannytech Yeah I know I can use node.js 8 without the debugger. But I like the debugger :slight_smile: Any idea when this will be updated? Node 8 has been out for a while and this isn’t a problem that will be going away.


#8

While I’m not a part of the amazing team at Cloud9, I am well aware of the incredible amount of work they have to put into Cloud9 to make it work so well. I’m sure issues like these are on the roadmap due to their requirement by so many developers, but included in that roadmap is everything from syntax highlighting to upgrading the Ubuntu workspaces to a newer version. Under the amount of pressure they are under from the community, they are doing admirably, and I’m sure this is a high priority, but I wouldn’t hold your breath.

TL;DR I don’t know when, but hopefully soon.


#9

@dannytech While I understand what you say I nevertheless feel like the majority of coders on cloud9 most likely use node.js . This being the case, I’m actually surprised not more people have taken issue with this. Basically up till recently node 7 was more than good enough, but now I’m starting to see packages that are node 8 only. I’m fine with this not being solved in the next month as I understand how things do take time. However I would expect it to be solved eventually and hopefully soon.


#10

I 100% agree. It’s also likely it’s high on their list, given Cloud9 is developed in Cloud9, so assuming they use the debugger, it would be a good idea to get it to work.


#11

any news about debug node 8?


#12

Still looking into it on our side…unfortunately, no ETAs yet, although you can be assured that this is a priority. The debugging protocol we’ve used has been deprecated since v7.7.0, which wasn’t an issue as we previously shipped with older versions of Node: https://nodejs.org/en/docs/guides/debugging-getting-started/#legacy-debugger

For now, if you need to debug, we recommend using a pre-v.7.7.0 version.


#13

Hi any update on this. We would really like to have debug support with node 8


#14

This is definitely becoming an important issue. There is a lot of code out there that uses syntax only valid in v8, e.g await for asynchronous processing. I hope that this is fixed soon, or Cloud 9 will become increasingly less relevant to my work, and that of many others, no doubt.


#15

badly needed node.js 8 debugging support in cloud9 !


#16

Hi, there.
Is there any update on this issue?


#17

Hi every one !

I need to use Node.JS v9, there is no update for the new version of debugger ?

Thank in advance


#18

Any news on this yet?


#19

this have been deployed today https://github.com/c9/core/commit/d9e810064017b0b78b007518a29f894b482a16ac


#20

that’s great !!
can you please guide us , how to make it work ?
I still getting

node: bad option: --nocrankshaft
node: bad option: --nodead_code_elimination