async def launch_chrome_with_remote_debugging(self):
        """Launch Chrome with remote debugging port"""
        # First launch Chrome normally to let user select profile
        chrome_path = {
            "Windows": "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe",
            "Darwin": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
            "Linux": "/usr/bin/google-chrome"
        }.get(platform.system())

        cmd = [
            chrome_path,
            f"--remote-debugging-port=9222",
            "--no-first-run",
            "--no-default-browser-check",
            "--start-maximized",
        ]

        if self.headless:
            cmd.append("--headless=new")

        try:
            print("Launching Chrome with command:", " ".join(cmd))
            process = await asyncio.create_subprocess_exec(
                *cmd,
                stdout=asyncio.subprocess.PIPE,
                stderr=asyncio.subprocess.PIPE
            )
            
            print("Waiting for Chrome to start and verify port is listening")
            # Wait for Chrome to start and verify port is listening
            for _ in range(10):  # Try for 10 seconds
                await asyncio.sleep(1)
                try:
                    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
                    result = sock.connect_ex(('127.0.0.1', 9222))
                    sock.close()
                    if result == 0:
                        print("Chrome started successfully with remote debugging port")
                        return process
                except:
                    continue
            
            raise RuntimeError("Chrome failed to start with remote debugging port")
            
        except Exception as e:
            print(f"Error launching Chrome: {e}")
            if process:
                stderr = await process.stderr.read()
                print(f"Chrome stderr output: {stderr.decode()}")
            raise RuntimeError(f"Failed to launch Chrome: {str(e)}")
Launch Chrome with remote debugging port
backend/Browser/webrover_browser.py