Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inspecting crashes intro #2198

Merged
merged 3 commits into from
May 22, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/code/os-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,17 @@ G_MESSAGES_DEBUG=all ./Application
[More information on message logging](https://developer.gnome.org/glib/stable/glib-Message-Logging.html#g-log).

To view logs from all your applications you can use `journalctl`. [More info](https://www.digitalocean.com/community/tutorials/how-to-use-journalctl-to-view-and-manipulate-systemd-logs).

## Inspecting crashes {#inspecting-crashes}

The [GNU Project Debugger (gdb)](https://www.gnu.org/software/gdb/) can do a lot, but we're mostly going to focus on getting useful information when an application crashes.
1. Open an application in gdb, for example AppCenter by running:
```
gdb io.elementary.appcenter
```
2. Now run this application by typing `run` and pressing enter.
3. If the application doesn't crash right away try reproducing the crash.
4. Get more information by typing `backtrace` and pressing enter.
5. Please share the lines after `(gdb) backtrace`, those should provide useful information.

Another tutorial: [Debugging with GDB](https://betterexplained.com/articles/debugging-with-gdb/)