r/node • • Oct 27 '16

Chrome DevTools can now hotswap (live edit) Node.js code natively, made a gif of how to try it out

https://umaar.com/dev-tips/119-node-js-hot-code-swap/
64 Upvotes

15 comments sorted by

6

u/9thHokageHimawari Oct 27 '16

That sounds awesome. I wonder if it works fine with heavier stuff like express?

3

u/iRedditWhilePooping Oct 27 '16

Maybe I'm being totally dumb - how is this useful? Since node is generally backend, wouldn't it be more useful to use other backend debugging tools?

2

u/aclave1 Oct 27 '16

Chrome can remotely debug node.js code. So you can debug Server-side code from within your browser. It's handy to not have to ssh into the server and use cli debuggers.

0

u/[deleted] Oct 28 '16

[deleted]

1

u/joshmanders Oct 28 '16

On top of that think of Atom editor. It's literally just Chrome. It can be very powerful as a node editor now with built in debugger.

2

u/Macmee Oct 27 '16

YES!!!!!

2

u/Let-s_Do_This Oct 28 '16

Why can't I see the option to turn that on? Even when pulling up the super secret menu it still didn't show for me.

3

u/Gibbon_Ka Oct 28 '16

Note: I'm using Node.js 7.0 and Canary 56.

1

u/godlychaos Oct 28 '16

I don't see it either. I'm on Version 56.0.2903.0 canary (64-bit).

When I go to Settings -> Experiments, there is no Node Debugging option to check. :(

1

u/jamesaw22 Oct 28 '16

Has anyone got source maps working with this?

1

u/vladbagbuss Oct 28 '16

I hope there is quick adoption for this, would love it in vs-code. I wonder if you could even add breakpoints?

1

u/sd65 Oct 28 '16

Of course you can !

1

u/PitaJ Nov 02 '16

VS Code already had a very good debugger. But it doesn't have hotswap. I'm sure they're planning on adding it now that this is supported.