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.

Debugging in Webstorm

See original GitHub issue

Hi,

Fantastic project. I want to use it as a boilerplate for something I’m working on to save time in getting all the tooling right but finding it difficult to set up a debugging dev session for the api server using Webstorm. I’ve added a new configuration in Webstorm to run npm dev and edited package.json to look like this

"start-dev-api": {
  "command": "node $NODE_DEBUG_OPTION ./bin/api.js",
  "env": {
    "NODE_PATH": "./api",
    "NODE_ENV": "development",
    "APIPORT": 3030
  }
}

If I click run normally then everything runs ok and I can view the project at localhost:3000 but when I click debug run it just drops out to

[2] ==> 🌎  API is running on port 3030
[2] ==> 💻  Send requests to http://localhost:3030
[1] ----
[1] ==> ✅  xyz is running, talking to API server on 3030.
[1] ==> 💻  Open http://localhost:3000 in a browser to view the app.

Process finished with exit code 130 

does anyone have any pointers on how I could make this work?

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:5
  • Comments:9

github_iconTop GitHub Comments

1reaction
franklengcommented, Apr 12, 2016

@ballwood try running it from babel-node instead.

0reactions
gmadarcommented, May 8, 2017

@eric-xujun @stephshelley - try: "start-dev-api": { "command": "node $NODE_DEBUG_OPTION --expose_debug_as=v8debug --debug ./bin/api.js", "env": { "NODE_PATH": ".:./api", "APIPORT": 3030 } }, in the better-npm script. I haven’t tested it but a colleague of mine said it worked for him

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Debug With WebStorm - The JetBrains Blog
Prepare for debugging: create a run/debug configuration · Starting debugger · Debug tool window · Adding breakpoints to pause the code · Exploring ......
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 >
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 >
Debugging JavaScript in Chrome - Help | WebStorm - JetBrains
From the context menu of the editor or the selection, choose Debug <HTML_file_name>. WebStorm generates a debug configuration and starts a ...
Read more >
Debug JavaScript code from WebStorm or IntelliJ IDEA
Recently I was asked how to debug the JavaScript code in JetBrains IDEs. Some people feel more familiar and comfortable in IDEs than...
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