c4b0341f41fafdf04a3f57b308739cc17e5fb676
[AGL/documentation.git] / docs / ATTIC / 3_Developer_Guides / 4_X(cross)_Development_System:_User's_Guide / 3_Debugging_Your_First_AGL_Application / 3.4.3.4_Using_an_IDE.md
1 ---
2 edit_link: ''
3 title: Using an IDE
4 origin_url: >-
5   https://git.automotivelinux.org/src/xds/xds-docs/plain/docs/part-1/debug-ide.md?h=master
6 ---
7
8 <!-- WARNING: This file is generated by fetch_docs.js using /home/boron/Documents/AGL/docs-webtemplate/site/_data/tocs/devguides/master/xds-docs-guides-devguides-book.yml -->
9
10 # Using an IDE
11
12 This topic describes how to use `xds-gdb` from within an Interactive
13 Development Environment (IDE) to debug your application.
14 The topic uses the
15 [NetBeans](https://netbeans.org/) IDE as an example.
16
17 ## Prerequisites
18
19 Before using the IDE, you need to declare the project you want to debug
20 on the `xds-server`.
21
22 <!--section-note-->
23 **NOTE:**
24
25 The project you declare can also have been built using XDS.
26 For information on building the project using XDS, see the
27 "[Create your first AGL application](../../../#create-your-first-agl-application)"
28 section.
29 <!--end-section-note-->
30
31 ## NetBeans
32
33 This section presents an example using NetBeans version 8.x:
34
35 1. Select the **Options** item in the **Tools** menu.
36
37 2. Open the **Build Tools** tab.
38
39 3. Open the **C/C++** tab and click the **Add** button to reveal the "Add New
40    Tool Collection" dialog box:
41
42     ![Add new tool panel](./pictures/nb_newtool.png){:: style="width:90%; max-width:700px; margin:auto; display:flex"}
43
44 4. Fill in the **Make Command** and **Debugger Command** fields so that they point to the XDS tools.
45    Following is an example:
46
47     ![Add new tool panel](./pictures/nb_xds_options.png){:: style="width:90%; max-width:700px; margin:auto; display:flex"}
48
49 5. Click on **OK** button.
50
51 6. Select the **Project Properties** item in the **File** menu to
52    update your debug settings.
53
54 7. In the "Project Properties" dialog, be sure that the "Gen3 board"
55    appears in the "Configuration" field (i.e. active).
56
57 8. In the "Categories" navigation pane, select **Run**.
58
59 9. Set the following:
60
61    - Run Command: `target/start-on-root@renesas-gen3.sh`
62      <!--section-note-->
63      **NOTE:**
64
65      The script name could depend on the `RSYNC_TARGET`
66      variable you set in pre-build command.
67      <!--end-section-note-->
68
69    - Run Directory: `build_gen3`
70
71 10. In the "Categories" navigation pane, select **Debug**.
72
73 11. Set the following:
74
75     - Debug command: `/bin/true`
76
77     - Working Directory: Leave this field blank
78
79     - Gdb Init File: `target/gdb-on-root@renesas-gen3.ini`
80       <!--section-note-->
81       **NOTE:**
82
83       The script name could depend on the `RSYNC_TARGET`
84       variable you set in pre-build command.
85       <!--end-section-note-->
86
87       ![Select Model panel](./pictures/nb_project_debug-1.png){:: style="width:90%; max-width:700px; margin:auto; display:flex"}
88
89 12. Click **Apply**.
90
91 13. Click **OK** to save your settings.
92
93 14. Start debugging your application by selecting the **Debug Project** item
94     in the **Debug** menu, or by entering the **CTRL+F5** shortcut.