admin管理员组

文章数量:1201570

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.

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.

Share Improve this question asked Nov 12, 2017 at 20:33 Brian LeungBrian Leung 3711 gold badge3 silver badges4 bronze badges 1
  • It's a fairly complicated process for Firefox. I'd recommend their own guide on connecting remote devices. – Obsidian Age Commented Nov 12, 2017 at 20:37
Add a comment  | 

2 Answers 2

Reset to default 16

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

There's a tool called node-firefox that you can use for that, you can download it from:

npm install node-firefox

Here's the source code: https://github.com/mozilla/node-firefox

And a introductory guide: https://hacks.mozilla.org/2015/02/introducing-node-firefox/

本文标签: javascriptHow to debug Nodejs with FirefoxStack Overflow