Difference between revisions of "IDE Window: DebuggerGeneralOptionsFrame"

From Free Pascal wiki
Jump to navigationJump to search
(Created page with "<noinclude>{{IDE Window: Debugger General Options}}<!--- This page may be used as template in other pages ---></noinclude> == General == This article describes the "General"...")
 
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>{{IDE Window: Debugger General Options}}<!--- This page may be used as template in other pages ---></noinclude>
+
<noinclude>{{IDE Window: Debugger Options}}<!--- This page may be used as template in other pages ---></noinclude>
  
== General ==
+
[[Image:dbg general options.png|right]]
This article describes the "General" Debugger settings in the Lazarus options dialog. Reachable via the Tools/Options menu.
+
 
 +
<div style="min-width:20%; display:table;">
 +
==  [[Main menu|'''Main Menu''']] > [[Main menu#Tools|'''Tools''']] > '''Options''' : '''Debugger''' > '''General''' ==
  
 
Before Lazarus 2.2 these options used to be part of: [[IDE_Window:_Debugger_Options]]
 
Before Lazarus 2.2 these options used to be part of: [[IDE_Window:_Debugger_Options]]
  
<center>[[Image:dbg general options.png]]</center>
+
General options and features for the Debugger
  
 +
__TOC__
 +
</div>
 +
<br clear=all>
 +
 +
== Options ==
 
=== Additional search path ===
 
=== Additional search path ===
 
If the IDE needs to find the sources for any unit included and described by the debugged executable, then it will use these directories.
 
If the IDE needs to find the sources for any unit included and described by the debugged executable, then it will use these directories.
Line 18: Line 25:
 
=== Show message on stop ===
 
=== Show message on stop ===
 
The debugger can show a dialog when the debugged app terminated.
 
The debugger can show a dialog when the debugged app terminated.
 +
 +
=== Show message on stop with Error (Exit-code <> 0) ===
 +
Override '''Show message on stop''' when the application returned an error code. The error code is shown in the message dialog.
  
 
=== Reset Debugger after each run ===
 
=== Reset Debugger after each run ===
Line 28: Line 38:
 
=== Automatically close assembler window, after source not found ===
 
=== Automatically close assembler window, after source not found ===
 
If the application in the debugger is paused outside the user sources, the debugger sometimes can not show a line in any source code to indicate where it stopped. In such cases the debugger opens the assembler window.
 
If the application in the debugger is paused outside the user sources, the debugger sometimes can not show a line in any source code to indicate where it stopped. In such cases the debugger opens the assembler window.
If the option is set, continuing execution will close the assembler window in such cases (I.e., if it was opened due to the described condititon)
+
If the option is set, continuing execution will close the assembler window in such cases (I.e., if it was opened due to the described condition)
 +
 
 +
=== Automatically set "use instance class type" for new watches ===
 +
 
 +
If new [[IDE_Window:_Watch_list|watches]] are added the property [[IDE_Window:_Watch_list#Watch_Properties|Watch Properties: Use instance class]] will be enabled by default.
 +
 
 +
If the watch is an object, using this the debugger will find the actual class of the object and display the fields of the instance's class rather than the declared class.
 +
 
 +
=== Allow function calls in watches (if supported by backend) ===
 +
 
 +
Currently only with the [[LazDebuggerFp|LazDebuggerFp (FpDebug)]].
 +
 
 +
Enables the option in the watch property, to allow individual watches to call functions in the debugged app. Calling functions may have side effects. For details see [[FpDebug-Watches-FunctionEval]]
  
 
== See also ==
 
== See also ==
 
* [[Debugger Setup]]
 
* [[Debugger Setup]]

Latest revision as of 00:33, 12 June 2023

English (en)

dbg general options.png


Options

Additional search path

If the IDE needs to find the sources for any unit included and described by the debugged executable, then it will use these directories.

The IDE will first search in directories belonging to the project (so they do not need to be added here) and directories of any packages used. But if it can not find a given unit's source in the project/packages then it will search the "Additional search path"

Before using this option you should ensure you understand why the debugger did not find your sources.

Show message on stop

The debugger can show a dialog when the debugged app terminated.

Show message on stop with Error (Exit-code <> 0)

Override Show message on stop when the application returned an error code. The error code is shown in the message dialog.

Reset Debugger after each run

In order to speed up starting a debug session, the debugger performs certain initializations only once. The GDB based debuggers for example, keep the gdb process running, and load the "application to be debugged" into this running process, saving the time to load and init gdb each time. In rare cases this has caused subsequent debug sessions to expose erroneous behaviour due to some internal setting changed in the first debug session. This option causes the debugger to be completely restarted between any two runs.

There also is a menu entry in the "Run" menu, that allows to reset the debugger just once.

Automatically close assembler window, after source not found

If the application in the debugger is paused outside the user sources, the debugger sometimes can not show a line in any source code to indicate where it stopped. In such cases the debugger opens the assembler window. If the option is set, continuing execution will close the assembler window in such cases (I.e., if it was opened due to the described condition)

Automatically set "use instance class type" for new watches

If new watches are added the property Watch Properties: Use instance class will be enabled by default.

If the watch is an object, using this the debugger will find the actual class of the object and display the fields of the instance's class rather than the declared class.

Allow function calls in watches (if supported by backend)

Currently only with the LazDebuggerFp (FpDebug).

Enables the option in the watch property, to allow individual watches to call functions in the debugged app. Calling functions may have side effects. For details see FpDebug-Watches-FunctionEval

See also