Javascript Debugging not working in Rider

I want to debug a React Typescript App in Rider, but I don't seem to be not able to get it to work. Instead I get the following error:

Waiting for connection to localhost:38841.
Please ensure that the browser was started successfully with remote debugging port opened.
Port cannot be opened if Chrome having the same User Data Directory is already launched.

I had a look at the following resources:

You can reproduce the error like this (I use Ubuntu 20.04.1 and Rider 2021.2.2):
1. execute create-react-app my-app --template typescript
2. open the folder in Rider
3. create and run a npm debug configuration (this works as the website is available in the browser at http://localhost:3000)

4. Create and run a Javascript Debug Configuration (Chrome for me is Chromium as I have Linux as an OS)

5. When executing the Javascript debug configuration the following error occurs:

Waiting for connection to localhost:38841.
Please ensure that the browser was started successfully with remote debugging port opened.
Port cannot be opened if Chrome having the same User Data Directory is already launched.

I'm really stuck here, so I'm happy for all help. :)
Thanks, Michael

2 comments
Comment actions Permalink

Please make sure that no Chrome instances are running when you start the debugger. Also, do you use Chrome installed with snap? It doesn't work due to permissions issues, see https://youtrack.jetbrains.com/issue/WEB-38511#focus=Comments-27-4472759.0-0 for more info/workaround.
If it doesn't help, you must have faced a network configuration issue - seems that some certain dynamic port numbers are blocked by a firewall/proxy/etc. Does the issue persist after the system reboot?

0
Comment actions Permalink

Hi Elena,
I had chromium installed with snap. After I reinstalled the packages directly from the debian repository everything worked perfectly, so my problem is fixed. Thanks so much, Elena. :)

For everyone else, who is having the same problem: it is not enough to just run sudo apt install chromium-browser as described here: https://www.omgubuntu.co.uk/2019/08/install-chromium-browser-ubuntu#:~:text=Just%20run%20sudo%20apt%2Dget,developed%20(primarily)%20by%20Google. This just runs snap in the background.

What worked for me was this: https://askubuntu.com/questions/1204571/how-to-install-chromium-without-snap. This actually uses the chromium packages from the debian repository and not snap.

1

Please sign in to leave a comment.