Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug Node.js with Firefox?

I'm aware of how to access the Chrome Dev Tools with Google Chrome to debug Node.js applications: just go to about://inspect.

I encountered a line of text on MDN mentioning that Firefox could be used for Node.js applications, but going to about://inspect in Firefox doesn't work. I'd like to know how this would be done in Firefox, if it is indeed possible.

like image 909
Brian Leung Avatar asked Nov 12 '17 20:11

Brian Leung


People also ask

CAN Node JS run in Firefox?

Node. js is built with the V8 JavaScript engine from Google's Chrome browser, but Mozilla is transplanting Firefox's JavaScript technology in a project called SpiderNode. (The JavaScript engine in Firefox is called SpiderMonkey, and the hybrid technology used in SpiderNode is called V8Monkey.)


1 Answers

Because Firefox uses a different Javascript engine (Gecko) than Node.js (V8), it's impossible to use the Firefox dev tools to debug Node scripts. As of this post, MDN says as much in their "Remote Debugging" article:

You can connect the developer tools to Gecko-based runtimes...

https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging

like image 152
eritbh Avatar answered Sep 22 '22 16:09

eritbh