Has anyone ever got JS debugging in PHPStorm working properly?
I had some time this morning so I thought I'd try to get javascript debugging working properly in PHPStorm so that my future debugging sessions are more rosey and less frustrating . - Nope.
I can debug a site in JS/PHPStorm if I'm willing to put up with 2 new windows popping up every time I start a session, but I wanted it to open in my user profile so that it opens in a new tab with my browser extensions, on the same screen etc… And I did manage that…
But now I get about:blank, and then PHPStorm says it's waiting for a connection on some random port (changes every time) that I don't seem to be able to control. I'm using Opera, but the results are similar in Chrome (as you'd expect).
What do I not understand here?
Please sign in to leave a comment.
The IDE uses the Chrome Debugging Protocol and runs Chrome (Opera, etc.) with the
--remote-debugging-portoption. However, if the browser is already started, a debugging port can't be opened for any new or existing Chrome instance that has the same user data directory. That's why the debugger can't be attached and you see the about:blank.If you like the browser to start with your user data when debugging, please do the following:
Save your preferred Chrome user data on your computer in a separate custom directory different from the Chrome default user data directory.
You need to save your preferred user data in a separate custom directory because Chrome (Opera, Edge and other Chrome-based browsers) 136 and later does not support debugging in the default user directory. Learn more from the Chrome official website.