@dynamicu/chromedebug-mcp 2.6.4 → 2.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +25 -0
- package/chrome-extension/manifest.free.json +3 -4
- package/dist/chromedebug-extension-free.zip +0 -0
- package/package.json +1 -1
- package/scripts/webpack.config.free.cjs +1 -1
- package/scripts/webpack.config.pro.cjs +1 -1
- package/src/cli.js +6 -0
- package/src/index.js +6 -1
- package/src/services/unified-session-manager.js +22 -2
package/CLAUDE.md
CHANGED
|
@@ -23,6 +23,9 @@ npm run server # Run standalone server
|
|
|
23
23
|
npm run single-server # Run with --single-server flag
|
|
24
24
|
npm run cleanup # Clean up stale Chrome processes
|
|
25
25
|
npm run cleanup-force # Force cleanup of all Chrome processes
|
|
26
|
+
|
|
27
|
+
# Persistent server (won't be killed by other instances)
|
|
28
|
+
chromedebug-mcp --persistent # Start a persistent server for manual debugging
|
|
26
29
|
```
|
|
27
30
|
|
|
28
31
|
### Testing
|
|
@@ -235,8 +238,30 @@ Chrome Debug provides a CLI tool that can be used directly:
|
|
|
235
238
|
```bash
|
|
236
239
|
chromedebug-mcp # Runs the MCP server (equivalent to npm start)
|
|
237
240
|
npx chromedebug-mcp # Run without global installation
|
|
241
|
+
|
|
242
|
+
# Persistent server mode
|
|
243
|
+
chromedebug-mcp --persistent # Won't be killed by other instances
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
### Persistent Server Mode
|
|
247
|
+
|
|
248
|
+
The `--persistent` flag marks a server as persistent, preventing it from being killed when other ChromeDebug instances start. This is useful for:
|
|
249
|
+
|
|
250
|
+
- **Manual debugging servers**: Keep a debug server running while using Claude Code
|
|
251
|
+
- **Multiple projects**: Run persistent servers for different projects simultaneously
|
|
252
|
+
- **Development workflows**: Maintain a stable server instance across multiple Claude Code sessions
|
|
253
|
+
|
|
254
|
+
Example:
|
|
255
|
+
```bash
|
|
256
|
+
# Terminal 1: Start persistent debug server
|
|
257
|
+
chromedebug-mcp --persistent --verbose
|
|
258
|
+
|
|
259
|
+
# Terminal 2: Use Claude Code normally
|
|
260
|
+
# Claude's MCP server will NOT kill the persistent server
|
|
238
261
|
```
|
|
239
262
|
|
|
263
|
+
See `PERSISTENT-FLAG-README.md` for detailed documentation and examples.
|
|
264
|
+
|
|
240
265
|
The package name is `chromedebug-mcp` but the project is commonly referred to as Chrome Debug.
|
|
241
266
|
|
|
242
267
|
## Additional Architecture Notes
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest_version": 3,
|
|
3
|
-
"name": "ChromeDebug MCP Assistant FREE v2.6.
|
|
4
|
-
"version": "2.6.
|
|
5
|
-
"description": "ChromeDebug MCP visual element selector [FREE Edition] [Build: 2025-10-
|
|
3
|
+
"name": "ChromeDebug MCP Assistant FREE v2.6.1",
|
|
4
|
+
"version": "2.6.1",
|
|
5
|
+
"description": "ChromeDebug MCP visual element selector [FREE Edition] [Build: 2025-10-28-v2.6.1]",
|
|
6
6
|
"permissions": [
|
|
7
7
|
"activeTab",
|
|
8
8
|
"scripting",
|
|
9
9
|
"tabs",
|
|
10
10
|
"storage",
|
|
11
11
|
"tabCapture",
|
|
12
|
-
"desktopCapture",
|
|
13
12
|
"notifications",
|
|
14
13
|
"offscreen"
|
|
15
14
|
],
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamicu/chromedebug-mcp",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.6",
|
|
4
4
|
"description": "ChromeDebug MCP - MCP server that provides full control over a Chrome browser instance for debugging and automation with AI assistants like Claude Code",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
package/src/cli.js
CHANGED
|
@@ -81,6 +81,12 @@ For details: https://github.com/dynamicupgrade/ChromeDebug#windows-setup
|
|
|
81
81
|
verbose: args.verbose
|
|
82
82
|
});
|
|
83
83
|
|
|
84
|
+
// Mark as persistent if requested
|
|
85
|
+
if (args.persistent) {
|
|
86
|
+
await sessionManager.markAsPersistent();
|
|
87
|
+
console.error('Session marked as persistent - will not be killed by other instances');
|
|
88
|
+
}
|
|
89
|
+
|
|
84
90
|
// Kill other instances unless --allow-multiple is set
|
|
85
91
|
if (!args.allowMultiple) {
|
|
86
92
|
await sessionManager.killOtherInstances();
|
package/src/index.js
CHANGED
|
@@ -153,7 +153,8 @@ class ChromePilotApp {
|
|
|
153
153
|
noCleanup: false,
|
|
154
154
|
verbose: false,
|
|
155
155
|
dbPath: null,
|
|
156
|
-
allowMultiple: false
|
|
156
|
+
allowMultiple: false,
|
|
157
|
+
persistent: false
|
|
157
158
|
};
|
|
158
159
|
|
|
159
160
|
const argv = process.argv.slice(2);
|
|
@@ -195,6 +196,9 @@ class ChromePilotApp {
|
|
|
195
196
|
case '--allow-multiple':
|
|
196
197
|
args.allowMultiple = true;
|
|
197
198
|
break;
|
|
199
|
+
case '--persistent':
|
|
200
|
+
args.persistent = true;
|
|
201
|
+
break;
|
|
198
202
|
case '--help':
|
|
199
203
|
this.showHelp();
|
|
200
204
|
process.exit(0);
|
|
@@ -242,6 +246,7 @@ Options:
|
|
|
242
246
|
--no-cleanup Skip cleanup of dead processes on startup
|
|
243
247
|
--verbose Enable verbose logging including session info
|
|
244
248
|
--allow-multiple Allow multiple ChromeDebug instances (default: kill others on startup)
|
|
249
|
+
--persistent Mark as persistent server (won't be killed by other instances)
|
|
245
250
|
--help Show this help message
|
|
246
251
|
|
|
247
252
|
Session Isolation:
|
|
@@ -31,7 +31,8 @@ export class UnifiedSessionManager {
|
|
|
31
31
|
port: null,
|
|
32
32
|
processes: [],
|
|
33
33
|
locks: [],
|
|
34
|
-
heartbeat: Date.now()
|
|
34
|
+
heartbeat: Date.now(),
|
|
35
|
+
persistent: false // If true, won't be killed by other instances
|
|
35
36
|
};
|
|
36
37
|
|
|
37
38
|
this.heartbeatInterval = null;
|
|
@@ -354,6 +355,18 @@ export class UnifiedSessionManager {
|
|
|
354
355
|
}
|
|
355
356
|
}
|
|
356
357
|
|
|
358
|
+
/**
|
|
359
|
+
* Mark this session as persistent (won't be killed by other instances)
|
|
360
|
+
*/
|
|
361
|
+
async markAsPersistent() {
|
|
362
|
+
this.state.persistent = true;
|
|
363
|
+
await this.updateSessionFile();
|
|
364
|
+
|
|
365
|
+
if (this.verbose) {
|
|
366
|
+
console.error(`Session ${this.sessionId} marked as persistent`);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
357
370
|
/**
|
|
358
371
|
* Start heartbeat to keep session alive
|
|
359
372
|
*/
|
|
@@ -449,6 +462,7 @@ export class UnifiedSessionManager {
|
|
|
449
462
|
/**
|
|
450
463
|
* Kill all other ChromeDebug instances
|
|
451
464
|
* Uses session files to find PIDs, then kills them gracefully
|
|
465
|
+
* Skips sessions marked as persistent
|
|
452
466
|
* @returns {Array} Array of killed PIDs
|
|
453
467
|
*/
|
|
454
468
|
async killOtherInstances() {
|
|
@@ -459,6 +473,12 @@ export class UnifiedSessionManager {
|
|
|
459
473
|
for (const session of sessions) {
|
|
460
474
|
if (session.pid === currentPid) continue; // Don't kill ourselves
|
|
461
475
|
|
|
476
|
+
// Skip persistent sessions
|
|
477
|
+
if (session.persistent) {
|
|
478
|
+
console.error(`Skipping persistent session: PID ${session.pid} (session ${session.sessionId})`);
|
|
479
|
+
continue;
|
|
480
|
+
}
|
|
481
|
+
|
|
462
482
|
try {
|
|
463
483
|
// Check if process exists
|
|
464
484
|
process.kill(session.pid, 0); // Signal 0 = check existence
|
|
@@ -523,7 +543,7 @@ export class UnifiedSessionManager {
|
|
|
523
543
|
*/
|
|
524
544
|
async isChromeDebugProcess(pid) {
|
|
525
545
|
try {
|
|
526
|
-
const { execSync } =
|
|
546
|
+
const { execSync } = require('child_process');
|
|
527
547
|
|
|
528
548
|
// Get process command line
|
|
529
549
|
const cmd = execSync(`ps -p ${pid} -o command=`, { encoding: 'utf8' }).trim();
|