# Debugging Bazaar## Running Bazaar with Debug Messages EnabledYou do this the same as with any other GLib application:```shpkill bazaar; env G_MESSAGES_DEBUG=all bazaar```This will produce a flood of output. If you know the specific log domain youwant to see, you can replace `all` with that domain name, such as `flatpak` or`BAZAAR::CORE`.## Bazaar in GtkInspectorBazaar has its own gtk inspector page, which you can spawn with the key combo`control+shift+i`. This is meant to be useful for developers and distributors.The global debug mode toggle in this page enables some extra widgets in the UIthat display useful debugging information and some shortcut buttons to, forexample, easily inspect the UI entry for the visible application or copy anappid.You can also disable blocklists from this debug page. This is a temporaryinternal property, not a configuration option; It will not be saved for the nextBazaar process.The rest of the contents of this page should be self-explanatory.## Debugging Crashes### Flatpak#### Installing the Debug SymbolsThis is mostly based on [flatpakdocs](https://docs.flatpak.org/en/latest/debugging.html).Installing debug extensions so the stacktrace is actually useful for developers:```shflatpak install --include-debug --include-sdk io.github.kolunmi.Bazaar```You can remove all the gnome sdk and debug extensions again when you arefinished with debugging. This is quite a big download, please have patience.#### Actually Start DebuggingBazaar starts a background service once started, make sure it is not running first:```shflatpak kill io.github.kolunmi.Bazaar``````shflatpak run --devel --command=bash io.github.kolunmi.Bazaar```This will get you a shell inside the flatpak sandbox: run this: `gdb/app/bin/bazaar-daemon````sh[📦 io.github.kolunmi.Bazaar ~]$ gdb /app/bin/bazaar-daemon```Actually run bazaar:```sh$ (gdb) run```(reproduce the bug here so it crashes)after it crashed, retrieve the useful information:```sh$ (gdb) thread apply all backtrace```