Debug Apps

This topic summarizes different ways to debug apps running on Legato.

There are various tools available to determine why your app is failing or blocking:

Check App Status

Run app status on the target to list all apps and their current status. See app

Check App Crash Logs

Check the latest app crash logs or core dumps in either persistent or non-persistent location. See App Crash Logs

Run sdir

Run sdir list on the target to determine if the app is failing because it's unbound (IPC failing) or the server isn't running (not connecting). This helps if your client is waiting for a service to appear or a binding to be created. sdir can also list apps or users offering services. See sdir

Run Process in App

Run app runProc <appName> <procName> [options] or app runProc <appName> [<procName>] --exe=<exePath> [options] to execute a specific process in a running app's sandbox. app runProc can also set process priority. See app

Inspect App

Run inspect [interval=SECONDS] to set memory usage updates to help narrow any memory leaks causing failure. See inspect

Use Open Source Tools

You can also try some standard, open source debugging tools like:

  • strace - a system call tracer good for low level code examination.
  • GDB - the GNU project debugger good for setting breakpoints.

Run the -help option for documentation.

Copyright (C) Sierra Wireless Inc.