Difference between revisions of "Debugger Setup/es"

From Free Pascal wiki
Jump to navigationJump to search
Line 1: Line 1:
 +
{{Debugger Setup}}
 
__TOC__  
 
__TOC__  
 
= Configure the IDE =
 
= Configure the IDE =
Line 48: Line 49:
 
=External links=
 
=External links=
 
* [http://www.youtube.com/watch?v=cf4G06k2YL8 Setup Video Tutorial]
 
* [http://www.youtube.com/watch?v=cf4G06k2YL8 Setup Video Tutorial]
 
[[Category:Debugging]]
 
[[Category:Lazarus]]
 

Revision as of 06:14, 6 April 2016

English (en) español (es) français (fr) русский (ru)

Configure the IDE

Para ser capaces de depurar los proyectos, es necesario asegurarse de tener el IDE correctamente configurado.

Estas configuraciones no cambian normalmente. Lo habitual es que se configuren una sola vez después de instalar Lazarus o bien si se cambia o actualiza la instalación.

Open the Lazarus option dialog: Dbg setup options1.png

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.


Dbg setup options2.png

  • 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" Caso de no estar ver https://www.gnu.org/software/gdb/ Paquete 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:

Dbg setup project1.png Dbg setup project2.png
  • You must enable the "Generate Debug Info for GDB"
    • On Windows/Linux 32 bit it is highly recommended to use "Dwarf"
      Dbg setup project3.png
  • You must not use any of the following
    • "Strip Symbols"
    • "Link Smart"
    • Any optimization other than "Level 0" ("Level 1" may be used, but in some cases may cause issues)
      Dbg setup project4.png

GDB Version

GDB 7.5 is not supported by Lazarus 1.0. It can be used with trunk only.

GDB 7.7.1 seems to work well with Lazarus 1.2.4.

See also

External links