Skip to content

Chrome extension that allows a developer mode which allows editors to connect to Chrome.

Notifications You must be signed in to change notification settings

RemoteDebug/remotedebug-chrome-devmode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 

Repository files navigation

remotedebug-chrome-devmode


Chrome extension that allows a developer mode which allows editors to connect to Chrome.

Usage

100% transparent for 3rd party tools. Core debugger attaches to local WS server. Works as if Chrome were started with remote debugging enabled.

Architecture

                                      β”‚

                                      β”‚
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚                           β”‚     β”‚     β”‚                           β”‚
    β”‚          Chrome           β”‚           β”‚          VS Code          β”‚
    β”‚                           β”‚     β”‚     β”‚                           β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚
    β”‚  DevMode Chrome exension  β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚
                  β–²
                  β”‚                   β”‚
  socket.io / ws  β”‚                         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                  β”‚                   β”‚     β”‚      Chrome debugger      β”‚
                  β–Ό                         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚    DevMode node server    │◀─────────▢│   Chrome core debugger    β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
             WS server
                                      β”‚

                                      β”‚

                                      β”‚

A Chrome extension with debugger permissions required to get access to the debugger API without starting chrome with specific flag. The chrome extension can then connect to a local node server over WS/socket.io and forward the messages over a real WS server, which any regular CDP client can connect to. This way it's fully transparent to clients.

Chrome extension

-> Polling every 1000ms for ex http://localhost:9333 -> Connection -> -> Start WS server -> on Browser.getTargets command -> Debugger.getTargets -> on Browser.attach command -> Debugger.attach -> Debugger.onMessage -> send back over WS and reverse.

Node server:

Exposes WS and HTTP endpoint.

About

Chrome extension that allows a developer mode which allows editors to connect to Chrome.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published