agama/doc/debugging.md
2023-12-14 09:05:35 +01:00

1.5 KiB

Debugging

This document describes some tips for debugging problems in Agama.

The Web Frontend

Cockpit by default does not log any debugging messages, but you can enable it manually. After enabling the debug mode you can see all DBus traffic, executed commands and more.

To enable it open the developer tools in the browser (usually the F12 or Ctrl+Shift+I key shortcut), switch to the console and run this command:

window.sessionStorage.debugging = "all"

This enables logging for all Cockpit parts. If the log is too verbose you can enable just some specific parts:

"channel" - log the websocket traffic, includes most of the Cockpit traffic
"dbus" - log the DBus traffic when using the Cockpit DBus API
"http" - log HTTP traffic for the Cockpit HTTP client
"spawn" - log executed commands and results when using Cockpit process spawning

To turn off the debugging set it to the undefined value:

window.sessionStorage.debugging = undefined

The setting is stored in the session storage which means the value is kept between page reloads and each browser tab uses a different instance.

⚠️ Warning: Cockpit logs all data transferred between the browser and the server including sensitive data like passwords, registration codes or similar! Be careful when sharing the Cockpit logs! ⚠️