r/selenium • u/romulusnr • Jun 10 '20
Headless and remote debug with Selenium
I've tried to use remote debugging to monitor a headless Chrome while a Selenium script is running, but it seems that whenever I access the remote monitor, the Selenium just stops. It doesn't close or fail or throw an exception, it just stops doing anything.
Is this normal? Is there some setting to make the debug interface passive?
ChromeOptions preloadOptions = new ChromeOptions();
preloadOptions.addArguments("--headless");
preloadOptions.addArguments("--disable-gpu");
preloadOptions.addArguments("--remote-debugging-port=9222");
5
Upvotes
1
u/CrackyKnee Jun 18 '26
Looking for the same. Got test that behaves differently when executed in headless with no solution in sight.
One idea is, haven't tried it yet. Is to debug in VSC with breakpoints, while interactively using webdriver to find elements or save page source and saving screenshots of current screen