Simplified doc-site generation
[AGL/documentation.git] / docs / 0_Getting_Started / 6_ Developing_an_Application / 8_Debug_the_Application.md
1 ---
2 edit_link: ''
3 title: Debug the Application
4 origin_url: >-
5   https://raw.githubusercontent.com/automotive-grade-linux/docs-sources/master/docs/getting-started/app-workflow-debug-app.md
6 ---
7
8 <!-- WARNING: This file is generated by fetch_docs.js using /home/boron/Documents/AGL/docs-webtemplate/site/_data/tocs/getting_started/master/image-development-workflow-getting-started-book.yml -->
9
10 # Debug the Application #
11
12 You can debug your application many ways.
13 The method depends on factors such as the component you are debugging,
14 whether or not you are doing a post-mortem analysis, and your debugging
15 skills and productivity.
16 For example, do you know how to use the
17 [GNU Project Debugger](https://www.gnu.org/software/gdb/) (`gdb`) from a
18 console?
19 Or, is it better for you to use a remote user interface that is part of
20 an Integrated Development Environment (IDE) such as Eclipse?
21
22 For general information on debugging an application, see the
23 "[Overview](../../../devguides/reference/xds/part-1/debug-overview.html)"
24 topic under "Debugging Your First AGL Application".
25
26 Three methods exist:
27
28    * Use `gdb` on the target.
29
30      <!--section-note-->
31      **NOTE:**
32
33      How to use `gdb` and other debugging tools such as `valgrind`, `strace`,
34      and so forth is beyond the scope of the AGL Documentation.
35      See the appropriate documentation for third-party debugging tools.
36      <!--end-section-note-->
37
38    * Use Core Dumps if you have set the `agl-devel` feature.
39      Core Dumps are obviously more suited for post-mortem analysis.
40      For features, see the
41      "[Initializing Your Build Environment](./image-workflow-initialize-build-environment.html#initializing-your-build-environment)"
42      topic.
43
44      <!--section-note-->
45      **NOTE:**
46
47      Core Dumps are available only with the "Flunky Flounder" release (i.e. 6.x).
48      <!--end-section-note-->
49
50    * Use XDS remotely, which is based on `gdb` and
51      [`gdbserver`](https://en.wikipedia.org/wiki/Gdbserver).
52      See the
53      "[Using the XDS Command Line](../../../devguides/reference/xds/part-1/debug-cmd-line.html#xds-remote-debugging-mode)"
54      topic for more information.
55
56      For information on how to remotely debug the application using XDS from within an IDE, see the
57      "[Using an IDE](../../../devguides/reference/xds/part-1/debug-ide.html)"
58      section.
59
60    In order to use third-party debugging tools, you need to include the tools in the target image.
61    You gain access to the tools by enabling the `agl-devel` feature when you run the
62    `aglsetup.sh` script as described in the
63    "[Initializing Your Build Environment](./image-workflow-initialize-build-environment.html#initializing-your-build-environment)"
64    section.