I'm trying to set up debug environment in Rider for React application.
I have created an empty react app by by using npx create-react-app
. The app could be launched by npm start
command in cmd, which works perfectly.
Now I want to run it with within Rider IDE. I have attached a folder to solution and created npm run configuration. Parameters of run configuration is shown on pic. 1. Unfortunately, app shuts down almost immediately after lauching the configuration with following process log:
"C:\Program Files\nodejs\npm.cmd" start
Debugger listening on ws://127.0.0.1:52935/f0a517a3-e16e-4bf4-bab6-349810a881ba
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
Waiting for the debugger to disconnect...
^C^CTerminate batch job (Y/N)?
Process finished with exit code -1073741510 (0xC000013A: interrupted by Ctrl C)
No sigterm or ctrl-c is sent to the app by me, so it seems that Rider does it for some reason. As I said before, if I launch the app manually from cmd, it works perfectly well. I have tried reinstalling nodejs, npm, Rider, but it still has a problem. Is there any solution to this? Thanks for your help.
UPDATE
Found a temporary workaround by running js script behind npm command directly. Don't want to post it as an aswer, because I'm still trying to fix npm run configuration and waiting a respond from Rider support.
CodePudding user response:
Today my Rider was updated to version 2022.1.2 and issue was gone.
CodePudding user response:
I was struggling with an Angular application, but I finally managed it with the following settings:
- Create npm configuration for the Node.js backend
- Create JavaScript Debug configuration for your client
- Create Multirun configuration to start both the backend and the client