question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WebStorm Debugger

See original GitHub issue

How can we debug this using WebStorm?

I’ve tried running npm start run configuration with the WebStorm debugger, but it quits the process once it reaches a breakpoint. I’ve tried the suggestion here, https://github.com/kriasoft/react-starter-kit/issues/396#issuecomment-171331792 and it will show that the debugger is started, but the process quits when a breakpoint is reached and a tooltip is displayed in WebStorm that says “connection refused.”

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
jtiscionecommented, Jul 21, 2016
  • In Webstorm’s Run/Debug Configurations, create a “Node.js” configuration:
    • Under the “Configuration” tab, set “build/server.js” as the JavaScript file. Set the project root directory as the working directory. Also check the “Single instance only” checkbox. (Some Webstorm versions have a bug that requires you to add “–expose-debug-as=v8debug” as a Node parameter, or else it starts whining about v8debug not being enabled.)
    • Under the “Browser/Live Edit” tab, check the “After launch” checkbox, select which browser to use in the dropdown, check the “with JavaScript debugger” checkbox, and enter “http://localhost:3000” as the target URL. (Also check the “Single instance only” box on this tab too.)
  • Run npm build
  • Click debug on that configuration and it should stop on both server and client breakpoints.
2reactions
wladistoncommented, Aug 22, 2016

Apparently the process quits because node is running under a child process. What I did was add the --debug arg under the runServer.js and create a remote debugger. ... cp.spawn('node', ['--debug', serverPath] ...

It isn’t the best solution due I have to run the npm start first but at least the npm start and debugger work together.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Debug With WebStorm - The JetBrains Blog
The debugger is one of the most essential features of WebStorm. With WebStorm you can debug all kinds of applications written in JavaScript, ......
Read more >
Debug Tests in WebStorm | Debugging | Recipes | Docs
Debug Tests in WebStorm · Step 1 - Install TestCafe · Step 2 - Add a Command To Debug TestCafe · Step 3...
Read more >
Debug JavaScript code from WebStorm or IntelliJ IDEA
4. Set a breakpoint in your source file and click on debug icon (shift+F9) for the just created debug configuration. The IDE and...
Read more >
How to Debug Node Serverless Using JetBrains WebStorm
When I went looking how to debug serverless, I struggled to find a solution that detailed debugging serverless in JetBrains WebStorm.
Read more >
WebStorm JavaScript debug terminal - node.js - Stack Overflow
In WebStorm you can run certain commands like npm run <command> and usually it will be highlighted in green which means you can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found