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:
- Use Logs to set filters, tracing, etc.
- Check App Status for current app info.
- Run sdir to check if your app is connected.
- Run Process in App to run or rerun a process in an app.
- Inspect App to review memory pool details.
- Check App Crash Logs to analysis system crash logs or core dumps.
- Use Open Source Tools can help, too.
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. Use of this work is subject to license.