You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then open `http://localhost:7100` in a browser. The tap is transparent -- it intercepts LSP frames for display without modifying them.
471
471
472
+
If the HTTP listener cannot bind (port in use, locked-down environment), the server logs a warning and continues with capture-only mode. `WithDebugUI` therefore never prevents the LSP from starting; trace export still works against the in-memory recorder.
473
+
474
+
### Capture-only mode
475
+
476
+
If you want trace capture for support bundles or debugging exports but do not want to bind an HTTP port, use `WithDebugCapture`:
`WithDebugUI` implies `WithDebugCapture`, so you only need one or the other. Both feed the same recorder, which powers `SaveDebugTrace` / `ExportDebugTrace`.
483
+
472
484
### Messages tab
473
485
474
486
Real-time view of all JSON-RPC traffic between client and server:
Use `ExportDebugTrace` if you want the JSON bytes instead of writing directly to disk. `SaveDebugTrace` writes files with `0600` permissions because traces may contain source code, local paths, and project details. If the debug UI is not active, these methods return `server.ErrDebugTraceUnavailable`.
535
+
Use `ExportDebugTrace` if you want the JSON bytes instead of writing directly to disk. `SaveDebugTrace` writes files with `0600` permissions because traces may contain source code, local paths, and project details. If neither capture nor UI is enabled, these methods return `server.ErrDebugTraceUnavailable`.
<p>Open <code>http://localhost:7100</code> while the server is running.</p>
45
+
<p>If the HTTP listener cannot bind (port in use, restricted environment), the server logs a warning and continues with capture-only mode. <code>WithDebugUI</code> therefore never prevents the LSP from starting; trace export still works against the in-memory recorder.</p>
46
+
47
+
<h2>Capture-Only Mode</h2>
48
+
<p>For support bundles or always-on trace export without binding an HTTP port, use <code>WithDebugCapture</code>:</p>
<p><code>WithDebugUI</code> implies <code>WithDebugCapture</code>, so you only need one or the other. Both populate the same recorder, which powers <code>SaveDebugTrace</code> and <code>ExportDebugTrace</code>.</p>
36
51
37
52
<h2>What It Shows</h2>
38
53
<divclass="grid">
@@ -59,7 +74,7 @@ <h2>Save a Trace</h2>
59
74
RedactFilePaths: true,
60
75
Pretty: true,
61
76
})</code></pre>
62
-
<p>Use <code>ExportDebugTrace</code> to get JSON bytes instead. If debug UI is not active, both methods return <code>server.ErrDebugTraceUnavailable</code>.</p>
77
+
<p>Use <code>ExportDebugTrace</code> to get JSON bytes instead. If neither <code>WithDebugCapture</code> nor <code>WithDebugUI</code> is enabled, both methods return <code>server.ErrDebugTraceUnavailable</code>.</p>
0 commit comments