Help with debugging js in chrome with WebStorm

I can't get debugging of JS to work in WebStorm with Chrome.  I've tried every example out there.  Many being so old it's hard to know if they are relevant.  Each time I get:

Waiting for connection to localhost:50787.  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've followed everything that “More info…” gives, though not sure I understand it all.  

This shouldn't be this difficult!  WHAT is the magic sequence????


Can you please share a bit more context around the problem? Which version of the IDE are you using, what OS are you on? Please make sure that no Chrome instances are running when you start the debugger


I'm on CLion 2022.3 Build #CL-223.7571.171.  Windows 10.0.19045.  Yes, I have made sure no instances of chrome are running.  Tried creating a temp userdata folder for Chrome and setting that in a debug configuration. Tried using the “chrome.exe --remote-debugging-port=(tried different ports)”.  Tried just right-clicking and choosing debug with a breakpoint set.  All looks sooooo easy, nothing works! 


Ugh, sorry, so frustrated with it that I opened CLion and gave that build.  Webstorm is 2022.3.1 Build #WS-223.8213.51


OK, nevermind.  First time for everything.  A reinstall and update did the trick.  I uninstalled and reinstalled Chrome, and then ran an update on Webstorm, and debug is working Great!  Glad is was something simple.


Ah, I see, thanks for update! This is a problem with new Chrome versions: Chrome 111+  broke the debugger as it rejects the requests from unknown remote origins due to security
fixes; the fix is available in versions 2023.*.
For older IDE versions, passing --remote-allow-origins=* option to Chrome can be used as a workaround; the option has to be specified in Preferences | Tools | Web Browsers and Preview, in the Chrome Settings dialog that opens when you select Chrome configuration there and press Edit.


Please sign in to leave a comment.