DebugSocket
ConsoleMonster.Headless
An opt-in agent socket for inspecting and driving the app on a HeadlessTerminal, the way browser tests drive a page: read the screen as text or PNG, read the control tree with bounds and focus, and send keys, text, resizes and clicks. It listens on 127.0.0.1 only, requires a per-run token, masks secret patterns on every screen it sends, and never reports input values. The wire protocol (one JSON object per line) is described in Docs/Headless-Driver.md.
Inheritance
- object
- DebugSocket
Remarks
Nothing listens unless the host starts it: call DebugSocket.Start, or set CONSOLEMONSTER_HEADLESS=120x40 together with CONSOLEMONSTER_DEBUG_SOCKET=0 (any free port) or a port number, which starts one for the process's default headless terminal.
Usage
Explore 1 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 1
- Method DebugSocket.Start
Methods
public void Dispose() #Stops listening, closes open connections and removes the discovery file.
public static DebugSocket Start(HeadlessTerminal terminal, DebugSocketOptions? options = null) #Starts a debug socket for a headless terminal.
Parameters
- terminal ConsoleMonster.Headless.HeadlessTerminal
- The terminal whose screen and input the socket exposes.
- options ConsoleMonster.Headless.DebugSocketOptions? = null
- Port, token, discovery folder and extra redaction patterns.