Webstorm 2020.2.1 Remote Debugging do not work

Webstorm 2020.2.1 only opens a about:blank page, if i want to debug my angular application. After a while i get this error message:

Waiting for connection to localhost:52421. 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.

Thats correct on Windows 10 i cannot find any open port 52421 on any started chrome instance using netstat -ano. I only see the SYN_SEND from my webstorm instance. My guess the chrome instance is not started with the --remote-debuging-port option. What i have tried so far:

Changed the path directrly to chrome.exe under Tools -> Web Browsers. Add the remote-debugging-port option manually with port 52421 and used another chrome-user-data folder. Start the IDE as administrator. Without any effect. Chrome always starts with a blank page and i am unable to debug anything.

2020-08-28 10:12:16,546 [ 25] INFO - #com.intellij.idea.Main - IDE: WebStorm (build #WS-202.6948.73, 25 Aug 2020 10:11)
2020-08-28 10:12:16,547 [ 26] INFO - #com.intellij.idea.Main - OS: Windows 10 (10.0, amd64)
2020-08-28 10:12:16,547 [ 26] INFO - #com.intellij.idea.Main - JRE: 11.0.8+10-b944.31 (JetBrains s.r.o.)
2020-08-28 10:12:16,547 [ 26] INFO - #com.intellij.idea.Main - JVM: 11.0.8+10-b944.31 (OpenJDK 64-Bit Server VM)

...

2020-08-28 10:12:21,376 [ 4855] INFO - .diagnostic.PerformanceWatcher - Post-startup activities under progress took 751ms; general responsiveness: ok; EDT responsiveness: 1/1 sluggish
2020-08-28 10:12:21,384 [ 4863] INFO - cloudConfig.CloudConfigManager - === StatusBar.start create ===
2020-08-28 10:12:21,492 [ 4971] INFO - tor.impl.FileEditorManagerImpl - Project opening took 3519 ms
2020-08-28 10:12:21,704 [ 5183] INFO - .diagnostic.PerformanceWatcher - Pushing properties took 251ms; general responsiveness: ok; EDT responsiveness: ok
2020-08-28 10:12:22,054 [ 5533] INFO - .diagnostic.PerformanceWatcher - Pushing JS language level to 115 libraries took 1308ms; general responsiveness: ok; EDT responsiveness: 1/2 sluggish
2020-08-28 10:12:22,793 [ 6272] INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 1088ms; general responsiveness: ok; EDT responsiveness: ok
2020-08-28 10:12:22,798 [ 6277] INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 0 files to index
2020-08-28 10:12:26,534 [ 10013] INFO - gnostic.WindowsDefenderChecker - Windows Defender status: not used
2020-08-28 10:12:27,631 [ 11110] INFO - ion.PackageVersionRangeMatcher - Matching 61 done in 208 ms
2020-08-28 10:12:30,949 [ 14428] INFO - tellij.xml.Html5SchemaProvider - HTML5_SCHEMA_LOCATION = C:/Program Files/JetBrains/WebStorm 2020.2.1/lib/intellij-xml.jar!/resources/html5-schema/html5.rnc
2020-08-28 10:12:36,982 [ 20461] INFO - .script.IdeScriptEngineManager - javax.script.ScriptEngineManager initialized in 114 ms
2020-08-28 10:13:09,536 [ 53015] INFO - m.pty4j.windows.WindowsVersion - Windows version: 10.0.19041
2020-08-28 10:13:16,172 [ 59651] INFO - sole.jcef.JCEFConsoleHtmlPanel - WebConsole page loaded
2020-08-28 10:13:16,176 [ 59655] INFO - .console.WebConsoleHistoryView - WebConsole page initialization complete
2020-08-28 10:13:16,176 [ 59655] INFO - sole.jcef.JCEFConsoleHtmlPanel - initialization complete
2020-08-28 10:13:27,763 [ 71242] INFO - rowsers.BrowserLauncherAppless - Timed out
2020-08-28 10:13:27,763 [ 71242] INFO - rowsers.BrowserLauncherAppless - [20016:20400:0828/101317.874:ERROR:tcp_socket_win.cc(352)] bind() returned an error: Der Zugriff auf einen Socket war aufgrund der Zugriffsrechte des Sockets unzulässig. (0x271D)
[20016:20400:0828/101317.875:ERROR:tcp_socket_win.cc(352)] bind() returned an error: Der Zugriff auf einen Socket war aufgrund der Zugriffsrechte des Sockets unzulässig. (0x271D)
[20016:20400:0828/101317.875:ERROR:devtools_http_handler.cc(298)] Cannot start http server for devtools.

2020-08-28 10:24:25,062 [ 728541] INFO - sole.jcef.JCEFConsoleHtmlPanel - WebConsole page loaded
2020-08-28 10:24:25,063 [ 728542] INFO - .console.WebConsoleHistoryView - WebConsole page initialization complete
2020-08-28 10:24:25,063 [ 728542] INFO - sole.jcef.JCEFConsoleHtmlPanel - initialization complete
2020-08-28 10:27:45,332 [ 928811] INFO - j.ide.actions.RevealFileAction - Exit code 1
2020-08-28 10:30:10,126 [1073605] INFO - sole.jcef.JCEFConsoleHtmlPanel - WebConsole page loaded
2020-08-28 10:30:10,127 [1073606] INFO - .console.WebConsoleHistoryView - WebConsole page initialization complete
2020-08-28 10:30:10,127 [1073606] INFO - sole.jcef.JCEFConsoleHtmlPanel - initialization complete
2020-08-28 10:30:23,348 [1086827] INFO - rowsers.BrowserLauncherAppless - Timed out
2020-08-28 10:30:23,348 [1086827] INFO - rowsers.BrowserLauncherAppless - [18796:12556:0828/103013.456:ERROR:tcp_socket_win.cc(352)] bind() returned an error: Der Zugriff auf einen Socket war aufgrund der Zugriffsrechte des Sockets unzulässig. (0x271D)
[18796:12556:0828/103013.456:ERROR:tcp_socket_win.cc(352)] bind() returned an error: Der Zugriff auf einen Socket war aufgrund der Zugriffsrechte des Sockets unzulässig. (0x271D)
[18796:12556:0828/103013.456:ERROR:devtools_http_handler.cc(298)] Cannot start http server for devtools.

 

Any further advice?

4
34 comments

Elena Pogorelova thanks, I already found a solution:

You have to deselect the option "Ensure breakpoints are detected when loading scripts" option in Run/Debug Configurations -> <your Javascript Debug configuration>

0

Igolus it must be a problem introduced by recent Chrome update. Chrome 111.* rejects the requests unless started with --remote-allow-origins=*; the fix is available in 2023.1 Beta. See https://youtrack.jetbrains.com/issue/WEB-59211/Cant-attach-debugger-to-Chrome-Dev-111-Invalid-handshake-response-getStatus-403-Forbidden

If you don't want to upgrade you can also add the --remote-allow-origins=*; in the command line options of your browser configuration.

1

The solution suggested by Remco worked for me.  Go to Run - Edit Configurations.  Click on the "..." next to "Browser".  Click on "Chrome", then the "Edit" tool on the right.  Put "--remote-allow-origins=*" in the "Command line options" and save.

1

Please sign in to leave a comment.