Debugging in Webstorm
See original GitHub issueHi,
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:
- Created 7 years ago
- Reactions:5
- Comments:9
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ballwood try running it from babel-node instead.
@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