Open Chrome browser in debugging mode not working?

Viewed 45

I am a newbee here and a beginning hobby-programmer, starting with Python3 Selenium4 in Visual Studio 1.71.1. Working on a Windows 11 machine, up-to-date with the latest updates (as of today, 15th september 2022).

I know that what I am trying to do has been described here as a question many times before (connect Python-Selenium to an already open Chrome browser tab) and I have tried just about all the suggestions, but nothing seems to work.

Though I'll be glad to show the Python/Selenium code I've used, it's no use, because I think I already get stuck when simply trying to open Chrome in remote debugging mode and check if that worked, so I'll focus on that. Hope that's ok.

So I've started Chrome in debugging mode from the command prompt using two options I found on this forum (9222 is mentioned most often). chrome --remote-debugging-port=9222 --user-data-dir=”C:\MyDir\ChromeDebug” chrome --remote-debugging-port=9878 --user-data-dir=”C:\MyDir\ChromeDebug”

That opens Chrome just fine.

Next thing that I found as an advice many times is: check if Chrome is really working in debug mode: open manually another Chrome browser, go to url http://127.0.0.1:9222 (or :9878). What you apparently should see then is the url opened in the Chrome-brwoser-in-debugging-mode. But that doesn't happen, I see a blank screen.

So, I am in doubt if the first Chrome launch has really started in debugging mode. Or maybe something is preventing the connection to it. Or maybe even: does Chrome still support this feature or has it perhaps been depricated?

What I've tried:

  • Make sure no other tabs in Chrome are opened or any other Chrome launches than these two.
  • Switched off my Firewall
  • Re-installed Chrome (and restarted my laptop).
  • Looked for any other activities of Chrome in Task Manager (nothing there)
  • Searched for quite some time to find out if Google has perhaps depricated this Chrome feature: did not find any indication of that.

Questions:

  • I don't know if any other methods for a check exist than the one above, so any suggestions on that will be highly appreciated.
  • Is this feature still present in Chrome?
  • What (other than my firewall) could prevent the connection from the second to the first browser-in-debug-mode?

(By the way - Python reported this error: 'Application' executable may have wrong permissions. This seems to confirm my idea that either Chrome is not in debugging mode or something is preventing the connection to it).

Hope this way of asking a question satisfies the forum rules here. If not, please let me know and I'll correct, ok?

Thanks!

0 Answers
Related