Attach mode of electron-agent-bridge: drive the pages of an Electron app that is
already running with --remote-debugging-port, without any bridge code inside the app. The engine runs
in your process; main-process features (IPC, main logs, windows, eval) need Integrated or Launch mode.
npm install --save-dev @electron-agent-bridge/attach
import { attach } from '@electron-agent-bridge/attach';
const app = await attach({ port: 9222 });
const { data } = await app.call('snapshot.take', {});
app.close();
attach returns the same BridgeClient as @electron-agent-bridge/client. Anyone who can reach a remote
debugging port controls the pages, so expose it only on your own machine.
Modes · MIT licensed.
@electron-agent-bridge/attach: Attach mode — drive the renderers of a running Electron app over its remote debugging port, with the engine in this process and no runtime inside the app.