#788·OpenManus

Windows 11 的增强功能: Chrome 远程调试设置

作者: miracle777创建于 2025年3月18日更新于 2026年9月16日
标签inactive

1. Launch Chrome in Remote Debugging Mode

First, run start_chrome_debug.py to start Chrome in remote debugging mode.

Python start_chrome_debug.py

Keep the terminal window open after running this command. Chrome will launch with remote debugging enabled on port 9222.

2. Run the Main Application

In a separate terminal window, run the main application.

Python run_flow.py

run_flow.py executes the main flow of OpenManus and accepts user input.

3. Run the Test Script (Optional)

To verify browser connection and operations, you can also run test_browser.py.

Python test_browser.py

This script navigates to Google's homepage and retrieves the page title as a test.

Notes

Since Chrome is launched in remote debugging mode, it is recommended to close any existing Chrome processes before running start_chrome_debug.py. Make sure the settings in config/config.toml are correct.

Created Files

start_chrome_debug.py

import subprocess
import sys
import time
import os


def start_chrome_debug():
    """Launch Chrome with a remote debugging port"""
    print("Starting Chrome in remote debugging mode...")

    # Path to Chrome and the user data directory
    chrome_path = "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"
    user_data_dir = "C:\\Users\\[usernmae]\\AppData\\Local\\Google\\Chrome\\User Data"

    # Terminate existing Chrome processes (optional)
    # Note: This may end your current session.
    """
    try:
        subprocess.run(["taskkill", "/f", "/im", "chrome.exe"],
                      stdout=subprocess.PIPE,
                      stderr=subprocess.PIPE)
        time.sleep(1)
    except Exception as
…

内容来源: FoundationAgents/OpenManus