MCPcopy
hub / github.com/safing/portmaster / debugInfo

Function debugInfo

service/core/api.go:305–333  ·  view source on GitHub ↗

debugInfo returns the debugging information for support requests.

(ar *api.Request)

Source from the content-addressed store, hash-verified

303
304// debugInfo returns the debugging information for support requests.
305func debugInfo(ar *api.Request) (data []byte, err error) {
306 // Create debug information helper.
307 di := new(debug.Info)
308 di.Style = ar.Request.URL.Query().Get("style")
309
310 // Add debug information.
311
312 // Very basic information at the start.
313 di.AddVersionInfo()
314 di.AddPlatformInfo(ar.Context())
315
316 // Unexpected logs.
317 di.AddLastUnexpectedLogs()
318
319 // Status Information from various modules.
320 status.AddToDebugInfo(di)
321 captain.AddToDebugInfo(di)
322 resolver.AddToDebugInfo(di)
323 config.AddToDebugInfo(di)
324
325 // Detailed information.
326 AddVersionsToDebugInfo(di)
327 compat.AddToDebugInfo(di)
328 module.instance.AddWorkerInfoToDebugInfo(di)
329 di.AddGoroutineStack()
330
331 // Return data.
332 return di.Bytes(), nil
333}
334
335// getSavePermission returns the requested api.Permission from p.
336// It only allows "user" and "admin" as external processes should

Callers

nothing calls this directly

Calls 14

AddToDebugInfoFunction · 0.92
AddToDebugInfoFunction · 0.92
AddToDebugInfoFunction · 0.92
AddToDebugInfoFunction · 0.92
AddToDebugInfoFunction · 0.92
AddVersionsToDebugInfoFunction · 0.85
AddVersionInfoMethod · 0.80
AddPlatformInfoMethod · 0.80
AddLastUnexpectedLogsMethod · 0.80
AddGoroutineStackMethod · 0.80
GetMethod · 0.65
QueryMethod · 0.65

Tested by

no test coverage detected