how to debug electron render part with webstorm which written in typescirpt?

I write the program in typescript you need to start the program by command npm start, not like electron which can start with option --inspect, I don't know how to set the npm option to make the webstorm can attach to it. 

I already check this link but it not start with command `npm start`

https://blog.jetbrains.com/webstorm/2016/05/getting-started-with-electron-in-webstorm/

I can debug the main process now, but I don't know how to debug the render process by attaching it.

2
4 comments

You need adding --remote-debugging-port option to your script. What does your start script look like?

0

In my case, I have enable the devtools.

But when debugging the code , it always Paused in debugger after resuming the debugger.

I don't know whether it will be ok or not if I using the webstorm to debug the electron renderer javascript

 

0

I have the exact same problem. Followed instructions from here: Getting Started With Electron in WebStorm | The JetBrains Blog

  • Can debug main process
  • Cannot  debug render process
  • In fact, when I try to debug the render process, my breakpoint in the main process is what triggers, so it seems like the IDE is not connecting to the render process at all.
0

What does your start script look like? A demo project that reproduces the issue would be helpful

0

Please sign in to leave a comment.