Difference between revisions of "Debugger Setup"
m (typos) |
(Typos/grammar) |
||
Line 4: | Line 4: | ||
In order to be able to debug any of your projects, you need to make sure a the IDE is correctly configured. | In order to be able to debug any of your projects, you need to make sure a the IDE is correctly configured. | ||
− | + | These settings do not usually change. You need to make them only once after you installed Lazarus, or if you changed/updated your installation | |
;Open the Lazarus option dialog: | ;Open the Lazarus option dialog: | ||
[[image:Dbg_setup_options1.png]] | [[image:Dbg_setup_options1.png]] | ||
− | The image shows where to find the option dialog in | + | The image shows where to find the option dialog in Lazarus 0.9.31 and up. In previous versions the entry is in the "Environment" menu. |
[[image:Dbg_setup_options2.png]] | [[image:Dbg_setup_options2.png]] | ||
− | * Make sure | + | * Make sure that the option "Gnu debugger (GDB)" is selected. |
− | * The path to gdb.exe may differ | + | * The path to gdb.exe may differ: |
** On Linux/Unix based systems it may be something like "/usr/bin/gdb" | ** On Linux/Unix based systems it may be something like "/usr/bin/gdb" | ||
− | ** On Windows it should be in a folder called "mingw\bin\" | + | ** On Windows it should be in a folder called "mingw\bin\" under the directory in which Lazarus is installed. |
= Project Options = | = Project Options = | ||
Line 25: | Line 25: | ||
Please note: This will considerably increase the size of your executable ([[Lazarus_Faq#Why_are_the_generated_binaries_so_big.3F |See FAQ]]). If you want to build a release version of your software you should switch those settings off (see also [[IDE_Window:_Compiler_Options/de#Build_modes |Build Modes]]) | Please note: This will considerably increase the size of your executable ([[Lazarus_Faq#Why_are_the_generated_binaries_so_big.3F |See FAQ]]). If you want to build a release version of your software you should switch those settings off (see also [[IDE_Window:_Compiler_Options/de#Build_modes |Build Modes]]) | ||
− | The required settings | + | The required settings are made in the "Project Options" dialog: |
<table><tr><td> [[image:Dbg_setup_project1.png]] </td><td> [[image:Dbg_setup_project2.png]] </td></tr></table> | <table><tr><td> [[image:Dbg_setup_project1.png]] </td><td> [[image:Dbg_setup_project2.png]] </td></tr></table> | ||
Revision as of 12:30, 14 March 2013
Configure the IDE
In order to be able to debug any of your projects, you need to make sure a the IDE is correctly configured.
These settings do not usually change. You need to make them only once after you installed Lazarus, or if you changed/updated your installation
- Open the Lazarus option dialog
The image shows where to find the option dialog in Lazarus 0.9.31 and up. In previous versions the entry is in the "Environment" menu.
- Make sure that the option "Gnu debugger (GDB)" is selected.
- The path to gdb.exe may differ:
- On Linux/Unix based systems it may be something like "/usr/bin/gdb"
- On Windows it should be in a folder called "mingw\bin\" under the directory in which Lazarus is installed.
Project Options
In order to debug your project, you need to tell the IDE to compile it in a special way, which provides additional information required by the debugger.
Please note: This will considerably increase the size of your executable (See FAQ). If you want to build a release version of your software you should switch those settings off (see also Build Modes)
The required settings are made in the "Project Options" dialog:
- You must enable the "Generate Debug Info for GDB"
- You must not use any of the following
GDB Version
GDB 7.5 is not supported by Lazarus 1.0. It can be used with trunk only.