What is about main process Debugging


Hi there,

I still getting started with node.js and electron and i’m sure i will love it! :slight_smile:
But I can’t get a debugging environment running.

As written in den documentation, is node-inspector not running very well. In fact for me it doesn’t run anyway. (I think its more a problem of node-inspector itself.)

I tried visual studio code also, without success.
Is there any debugging method I missed or have I just caught a bad moment and it will be better the next weeks?:slight_smile:


Cannot find module ‘/usr/local/lib/node_modules/node-inspector/node_modules/v8-debug/build/debug/v0.5.4/node-v46-darwin-x64/debug.node’ – there is already a github issu for that)


I had this problem as well. I ended up adding bunyan and just dumping logs to a file. Bunyan is great for serializing objects to log the state of your app at a given point. But not if you need to pause on breakpoints, step-through, etc. I’m as interested as you in finding something that works for this. From your comment it looks like node-inspector is not doing its job?


I also have found this problem when trying to debug the main process.
Error: Cannot find module ‘/home/edu/.nvm/versions/node/v0.12.4/lib/node_modules/node-inspector/node_modules/v8-debug/build/debug/v0.5.4/node-v46-linux-ia32/debug.node’

I found that the node-v46-linux-ia32 folder does not exist but a node-v14-linux-ia32 does exist so I tryed to to create a simbolick link from the node-v14-linux-ia32 to the node-v46-linux-ia32, this did not solve the probem as it gave me the following error:
Error: /home/edu/.nvm/versions/node/v0.12.4/lib/node_modules/node-inspector/node_modules/v8-debug/build/debug/v0.5.4/node-v14-linux-ia32/debug.node: undefined symbol: _ZNK2v85Value8ToStringEv

Is there a fix for this problem?
Is there a alternative to this to be able to debug step by steb the electron main process?

Thank you or your colaboration…


No news about his problem???


still no news?
I tried using electron 0.36.4 and node v5.1.1.

Is there a combination of node/electorn that will work?

Thank you…


Have you taken a look at the documentation?



Thank you for your input.

Yes I read the documentation. I read several documentation form different versions of electron.
I have followed the steps and I get no were.

Last time I tried I got to the same place:Cannot find module /home/edu/.nvm/versions/node/v0.12.4/lib/node_modules/node-inspector/node_modules/v8-debug/build/debug/v0.5.4/node-v46-linux-ia32/debug.node’
(I do not even know what I did I was just trying to make it work with a hammer and nails :stuck_out_tongue: )


So you get all the way to the end where you’re clicking in the Chrome browser and you get that error message? Or is that message from some earlier step in the process? The more information you can share, the more likely someone can help.


The message is in the browser when I access the address that is given by the debugger ui.


This is caused by node-pre-gyp, you need to either patch your local copy or install a patched version. The link @leedohm provided earlier should have all the relevant information.


Thank you for your help.

As I understand from the instruction to get the node-pre-gyp patched I only neet to isue the following command:
$ npm install git+https://git@github.com/enlight/node-pre-gyp.git#detect-electron-runtime-in-find
And it will install the node-pre-gyp already patched.

SO I supose I have the node-pre-gyp with the patched version.


Yes, installing from that branch should leave you with a working version of node-pre-gyp. If you don’t see any improvement double-check that NPM didn’t install any other versions somewhere like node-inspector/node_modules (especially if you’re still on NPM v2) as that may be loaded instead of the patched version.


Ok I will check it later to see if it installed on another place.

Thank you.