Skip to content

Commit 326a243

Browse files
committed
Revise Remote Browser Connection documentation for clarity and conciseness
1 parent ba0b824 commit 326a243

File tree

1 file changed

+53
-69
lines changed

1 file changed

+53
-69
lines changed
Lines changed: 53 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,124 +1,108 @@
11
---
22
title: Remote Browser Connection
33
description: Connect to an existing Chrome browser for containerized development, custom profiles, and remote workflows
4-
sidebar_position: 11
54
---
65

76
# Remote Browser Connection
87

9-
## What Is Remote Browser Connection?
8+
Connect Roo to an existing Chrome browser instead of launching a new one. This feature bypasses Roo's default browser process creation, allowing Roo to work in containerized environments, with custom browser profiles, and across remote development workflows.
109

11-
Connect Roo to an existing Chrome browser instead of launching a new one. This powerful feature bypasses Roo's default browser process creation, enabling you to use Roo in containerized environments, with custom browser profiles, and across remote development workflows.
10+
> **Key Benefit:** Separates the browser process from the VS Code environment, solving common challenges in containerized development and remote workflows.
1211
13-
> **Key Benefit:** Remote browser connection solves common challenges with containerized development and remote workflows by separating the browser process from the VS Code environment.
12+
## Use Cases
1413

15-
### When To Use Remote Browser Connection
14+
- **DevContainers:** Connect from containerized VS Code to host Chrome browser
15+
- **Remote Development:** Use local Chrome with remote VS Code server
16+
- **Custom Chrome Profiles:** Use profiles with specific extensions and settings
17+
- **Shared Sessions:** Connect multiple Roo instances to one browser
1618

17-
- **DevContainers:** Connect from containerized VS Code to a Chrome browser running on your host system
18-
- **Remote Development:** Use Chrome on a local development machine while working on a remote server
19-
- **Custom Chrome Profiles:** Leverage specific profiles with your preferred extensions and settings
20-
- **Shared Browser Sessions:** Allow multiple Roo instances to connect to the same browser session
19+
## Setup
2120

22-
## Setting Up Remote Browser Connection
23-
24-
To use the remote browser connection feature, you'll need to complete three simple steps: launch Chrome with remote debugging enabled, configure Roo settings, and (if using containers) set up network access.
21+
Connect to a remote browser in three steps:
2522

2623
### 1. Launch Chrome with Remote Debugging
2724

28-
Launch Chrome with the remote debugging port enabled:
25+
Start Chrome with debugging enabled:
2926

30-
**On macOS:**
27+
**macOS**:
3128
```bash
3229
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug
3330
```
3431

35-
**On Windows:**
32+
**Windows**:
3633
```bash
3734
"C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --user-data-dir=C:\chrome-debug
3835
```
3936

40-
**On Linux:**
37+
**Linux**:
4138
```bash
4239
google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug
4340
```
4441

45-
> **Note:** The `--user-data-dir` parameter creates a separate Chrome profile that won't interfere with your regular browsing.
46-
47-
### 2. Configuring Roo Settings
42+
> **Note:** The `--user-data-dir` parameter creates an isolated Chrome profile that doesn't affect your regular browsing.
4843
49-
Once Chrome is running with remote debugging, configure Roo:
44+
### 2. Configure Roo Settings
5045

51-
1. Open VS Code settings and search for "Roo browser"
52-
2. Enable "Use remote browser connection"
53-
3. Optionally enter a custom Chrome DevTools Protocol URL (for non-standard setups)
54-
4. Click "Test Connection" to verify connectivity
46+
To access these settings:
5547

56-
![Remote Browser Connection UI](../../static/img/remote-browser-connection/remote-browser-connection.png)
48+
1. Click ⚙️ in the top-right corner
49+
2. Navigate to `Browser / Computer Use` settings
50+
3. Check "Enable browser tool"
51+
4. Check "Use remote browser connection"
52+
5. Enter custom Chrome DevTools Protocol URL (optional)
53+
6. Click "Test Connection" to verify
5754

55+
<img src={require('@site/static/img/remote-browser-connection/remote-browser-connection.png').default} alt="Remote Browser Connection Settings" width="700" />
5856

59-
### 3. Setting Up DevContainer Integration
57+
### 3. Configure DevContainer Network (If Applicable)
6058

61-
If you're developing inside a container, you'll need to configure network access to reach the host machine:
59+
For container-based development, configure network access to reach the host machine:
6260

6361
For VS Code devcontainers, add this network configuration to your `devcontainer.json`:
6462

6563
```json
66-
"runArgs": [
64+
{
65+
"runArgs": [
6766
"--network=host" // Enables access to host's Chrome instance
68-
]
67+
]
68+
}
6969
```
7070

71-
## Understanding How Connections Work
72-
73-
After configuration, Roo establishes connections with Chrome using a sophisticated multi-step process to ensure reliability.
74-
75-
When enabled, Roo connects to Chrome following this sequence:
76-
77-
1. Attempts connection using your custom URL (if provided)
78-
2. If unsuccessful, runs auto-discovery on localhost, Docker containers, and local network
79-
3. Falls back to launching a local browser instance if all remote connection attempts fail
71+
## Connection Process
8072

81-
## Troubleshooting Connection Problems
73+
Roo connects to Chrome in this sequence:
8274

83-
If you encounter issues with the remote browser connection, here are solutions to the most common problems:
75+
1. Tries your custom URL (if provided)
76+
2. Runs auto-discovery on localhost, containers, and network
77+
3. Falls back to launching a local browser if all attempts fail
8478

85-
- **Connection Failed:** Verify Chrome is running with the correct debugging flag and port
86-
- **Port Already in Use:** Change to an alternative port (e.g., `9333`) in both your Chrome launch command and Roo settings
87-
- **Network Issues:** Ensure your container/VM network settings allow access to the Chrome host machine
88-
- **Chrome Not Detected:** Check that firewall settings aren't blocking WebSocket connections
89-
- **Permission Errors:** Make sure you have the necessary permissions to access the specified `--user-data-dir` location
79+
## Troubleshooting
9080

91-
## Exploring Advanced Capabilities
81+
| Problem | Solution |
82+
|---------|----------|
83+
| Connection Failed | Verify Chrome is running with `--remote-debugging-port=9222` |
84+
| Port Already in Use | Change to alternative port in both Chrome and Roo settings |
85+
| Network Issues | Check container/VM can access host machine |
86+
| Chrome Not Detected | Verify firewalls allow WebSocket connections |
87+
| Permission Errors | Ensure access to the specified `--user-data-dir` location |
9288

93-
For power users and advanced scenarios, Roo's remote browser connection includes several sophisticated features that enhance flexibility and reliability.
89+
## Advanced Capabilities
9490

95-
### How Auto-Discovery Works
91+
### Auto-Discovery
9692

97-
When no specific URL is provided, Roo automatically locates Chrome instances by searching:
98-
- Standard debugging ports on localhost (9222, 9223)
99-
- Running containers with debugging-enabled Chrome
100-
- Network-accessible instances using discovery protocols
93+
When no URL is specified, Roo searches for Chrome instances across:
94+
- Standard debugging ports (9222, 9223) on localhost
95+
- Docker containers with debugging-enabled Chrome
96+
- Network-accessible instances via discovery protocols
10197

102-
### Understanding Automatic Fallback
98+
### Automatic Fallback
10399

104-
When remote connection attempts fail, Roo automatically launches a local browser instance, ensuring continuous workflow without manual intervention.
100+
When remote connections fail, Roo launches a local browser instance automatically to maintain workflow continuity.
105101

106-
### Alternative Setup: Using Chrome DevTools
102+
### Alternative Setup via Chrome DevTools
107103

108-
For situations where command-line configuration isn't ideal:
104+
For GUI-based configuration:
109105

110106
1. Open `chrome://inspect` in Chrome
111-
2. Click "Configure" next to "Discover network targets"
107+
2. Click "Configure" beside "Discover network targets"
112108
3. Add `localhost:9222` and click "Done"
113-
114-
## Related Features
115-
116-
Remote browser connection works seamlessly with other Roo features:
117-
118-
- **[Custom Modes](custom-modes)**: Create specialized browser-based modes
119-
- **[Code Actions](code-actions)**: Execute browser-based actions against remote instances
120-
- **[Large Projects](large-projects)**: Improve performance by separating browser processes
121-
122-
## Summary
123-
124-
Remote browser connection provides flexibility for containerized development, custom browser profiles, and remote workflows. By following the setup instructions in this guide, you can leverage the power of an existing Chrome instance for your Roo sessions, making your development process more efficient and adaptable to various environments.

0 commit comments

Comments
 (0)