[FEATURE] Make nodejs inspect configurable
See original GitHub issueIs your feature request related to a problem? Please describe. Currently nodejs inspect can not be configured. It starts default with 127.0.0.1:9229. But if you run the frontend in a docker container, you can not reach it. The IP must be changed into 0.0.0.0 to make it works. This is currently not possible. Or if you have a second app already running which is using 9229, then we have no possibility to change the port for inspect.
Describe the solution you’d like Please add to pwa-kit-dev start command two new parameters like inspectIP and inspectPort
Describe alternatives you’ve considered Found no alternatives.
Sample
program
.command('start')
.description(`develop your app locally`)
.addOption(
new program.Option('--inspect', 'enable debugging with --inspect on the node process')
)
.addOption(new program.Option('--noHMR', 'disable the client-side hot module replacement'))
.action(({inspect, noHMR}) => {
execSync(
`node${inspect ? ' --inspect=0.0.0.0:9229' : ''} ${p.join(process.cwd(), 'app', 'ssr.js')}`,
{
env: {
...process.env,
...(noHMR ? {HMR: 'false'} : {})
}
}
)
})
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top Results From Across the Web
Debugging - Getting Started - Node.js
Create a new Node.js debug configuration and hit Debug. --inspect will be used by default for Node.js 7+. To disable uncheck js.debugger ...
Read more >Debug Node.js Apps using Visual Studio Code
The Visual Studio Code editor includes Node.js debugging support. Set breakpoints, step-in, inspect variables and more.
Read more >Running and debugging Node.js | WebStorm Documentation
Create a Node.js run/debug configuration · From the main menu, select Run | Edit Configurations. · Specify the Node. · In the JavaScript...
Read more >Debugging and profiling Node.js applications - IBM Developer
Discover how to perform source-level debugging on your Node.js ... The command to run Node debugging client is: node inspect node_module .
Read more >How to Debug Node.js Code Using Multiple Tools - Kinsta
This tutorial demonstrates various tools to debug node applications and find their root causes. Dig in and learn from the ground up.
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 FreeTop 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
Top GitHub Comments
Thank you for raising this issue! This is a reasonable ask. We will take this up with the team and add it to our capacity when it is available.
Hi @muenzpraeger, i copied the command out of the script
cross-env NODE_ICU_DATA=node_modules/full-icu node --inspect=0.0.0.0:9229 app/ssr.js
But your hint with the node options env var is much cleaner, i will try it out. Thx.