- Notifications
You must be signed in to change notification settings - Fork928
Closed as not planned
Labels
Description
The agent has several HTTP endpoints which can be used for debugging. They are defined here:
Lines 1799 to 1812 in8c05651
func (a*agent)HTTPDebug() http.Handler { | |
r:=chi.NewRouter() | |
r.Get("/debug/logs",a.HandleHTTPDebugLogs) | |
r.Get("/debug/magicsock",a.HandleHTTPDebugMagicsock) | |
r.Get("/debug/magicsock/debug-logging/{state}",a.HandleHTTPMagicsockDebugLoggingState) | |
r.Get("/debug/manifest",a.HandleHTTPDebugManifest) | |
r.NotFound(func(w http.ResponseWriter,r*http.Request) { | |
w.WriteHeader(http.StatusNotFound) | |
_,_=w.Write([]byte("404 not found")) | |
}) | |
returnr | |
} |
We should document that these exist, as well as how to call them. This should naturally also mention the config flag which controls the listening address:
Lines 393 to 399 ine96652e
{ | |
Flag:"debug-address", | |
Default:"127.0.0.1:2113", | |
Env:"CODER_AGENT_DEBUG_ADDRESS", | |
Value:serpent.StringOf(&debugAddress), | |
Description:"The bind address to serve a debug HTTP server.", | |
}, |