IDE Window: IDE Options Dialog

This is an old revision of IDE Window: IDE Options Dialog, edited by Arent at . The current revision is 57545.

IDE Options main screen

Environment

{{:IDE Window: Environment Options]]

Editor

IDE Options - Editor

This is part of the online help for the IDE.

It describes the section: "Editor Options". You can open the described dialog in your IDE via:

The available editor options are:

JCF Format Settings

JCF Format Settings Options

Jedi Code Format

See: http://jedicodeformat.sourceforge.net/

Editor Macro Script

IDE Window: Editor Macro Script

Codetools

Codetool options

General

Additional Source search path for all projects/packages

If you are too lazy to setup packages and you do not want to share your projects/packages, then you can set here a global search path. Please note: "global" refers to codetools, and does not include the settings for the compiler. You have to add the path to the fpc.cfg as well.

Jumping (e.g. Method Jumping)

Indentation

Since 0.9.29 the source editor has a smarter auto indenter for pascal. It imitates your indentation. For example when you press return after a try the indenter will search for other try..finally blocks and indents accordingly. When pasting code from the clipboard the indenter will indent it too.

For a detailed explanation see Fully automatic indentation.

Class Completion

Insert class part

Defines where to insert new variables and method to the class declaration:

Insert methods

Where to insert new method bodies. Methods of the same class are always grouped together.

Method default section

What class visibility should be used for new methods by default (since 1.8).

Flags

Header comment for class

Add a header comment in front of the class declaration. For example { TForm }

Implementation comment for class

Add a comment in front of the first method body. For example { TForm }

Property completion

Code Creation

In this section you can define, where (and in which order) new procedures and units will be inserted.

Procedure insert policy

Where to insert new procedure bodies

Keep order of procedures

When inserting new procedure bodies, keep order of the interface.

Words

Keyword policy

How to write new keywords.

Identifier policy

How to write new identifiers.

Line Splitting

Space

Identifier completion

See the tutorial Identifier completion.

Add semicolon

Allow to add missing semicolon. For example:

 s:=Caption|  //

will add a semicolon. It does not add a semicolon if the identifier is a L-Value like in the following example:

  Button1|

Add assignment operator

This will add a := if the identifier is a L-Value with no sub identifiers. For example:

  Caption|  // Caption is a string, so Caption:=

Automatically invoke after point

If enabled the identifier completion is automatically shown, when user pressed a point . and waited for the time shown in Editor / Automatic Features / Tooltip expression evaluation. For example:

  Button1.|  // typing the point and wait will show the completion box

Add parameter brackets

Replace whole identifier

Code Explorer

Code Explorer Options The dialog is explained here: IDE Window: Code Explorer

Update

Preferred Exhibition Mode

Refresh automatically

Categories

Shows the available categories. Check all that you want to see in the code explorer.

The category Code Observer exists since 0.9.27 and lists uncommon or hard to read code fragments. You can set the details in the next option page.

Code Observer

Complexity

Empty constructs

begin
  {$IFDEF win32}write;{$ENDIF} 
end;

Style

Other

for i:=0 to 10 do
  if i=0 then
writeln('');
published
  property Flag: booolean read FFlag write SetFlag;

Since FPC 2.2.4 such properties are treated as if they have the nodefault specifier. That means they are always saved to the lfm.

Ignore next unnamed constants

These constants will not be listed in the unnamed category. Examples:

0
1
'a'
'abc'
#3
#$3

Ignore constants in next functions

Constants passed as parameters to the following functions will not be listed in the unnamed category. There are two types. For example:

Write
.ParamByName

Note the point in front of ParamByName.

Result:

Write('A'); // 'A' will be ignored
MemStream.Write('A'); // 'A' will be listed
DataModule1.SQLQuery1.Params.ParamByName('ART_ID').AsString; // will be ignored
ParamByName('ART_ID').AsString; // will be listed

Debugger

This page is outdated. The setting dialog was changed. Options have been moved to new pages and/or the "project settings"

General

This article describes the settings in the Tools/Options menu related to debugging.

In Lazarus 2.2 this frame was replaced by Debugger General Options and Debugger Backend Options

Debugger type and path

Choose the debugger.

None
No debugger. On Run, simply execute the program.

FpDebug internal Dwarf-debugger

GNU debugger (gdb)
GDB is not a part of Lazarus. Unless you are using Windows or macOS with Xcode, you must install it yourself. This is the connector to gdb. You must set the path to gdb (for example /usr/bin/gdb) in the field below.
GNU debugger through SSH
for remote debugging. You can use an SSH connection to another computer and execute gdb there. You need a SSH connection without prompt for password for this. See the SSH documentation on how to do that. This feature has certain limits. Read more ...
GDB remote debugger (gdbserver)
for remote debugging.

LLDB Debugger (Alpha)

LLDB Debugger (with fpdebug) (beta)

Additional search path

You can add extra directories, where to search for sources, named in the debugging information of the executable. This is used for all projects.

Debugger general options

Show message on stop
Enable this to show a notification, when programs stops.
Reset debugger after each run
The IDE keeps GDB running and re-uses it. If you are using a (older) version of GDB that does not support this, then you can start a new GDB instance each time you start a debug session.

Debugger specific options

Each debugger type has special options.

FpDebug internal Dwarf-debugger

NextOnlyStopOnStartLine

GNU debugger (gdb)

Debugger_Startup_Options
Pass extra arguments to GDB. This is not needed for normal usage. This is if you are familiar with GDB and wish to modify it's behaviour. Using this option may interfere with the proper working of the debugger
DisableLoadSymbolsForLibraries
Prevent loading any symbols from libraries. (Must not be used, if debugging libraries). There are several gdb issues triggered by symbols loaded from libraries. If you get any error mention "solib", try setting this to true. Also see: GDB_Debugger_Tips#Known_Problems_.2F_Errors_reported_by_the_IDE
EncodeCurrentDirPath/EncodeCurrentFilePath
Experimental. Those option affect the quoting of certain path/filenames when they are given to GDB. Changing the option to the wrong value will stop the debugger from working.
InternalStartBreak
Changes the way the debugger detects your applications, main entry point. It is advised to leave this at default. Other values may be tried, if the debugger report an error "The debugger could not set a breakpoint on the applications entry point**".
MaxDisplayLengthForString
For any string (pchar) gdb reads a maximum as specified by this setting. GDB always terminates at the 1st zero. GDB does not really handle pascal strings well.
UseAsyncCommandMode
Mainly supported by gdbserver. Setting should be used for any remote debugging (gdbserver/gdb over ssh). See gdb documentation for "set target async". IF supported by gdb, can also be used for local debugging.
WarnOnInternalError
Default true. If set to False, internal errors by gdb will be ignored by the IDE. Yet that does not change, that gdb did have an internal error, and that debugging may report incorrect data, or dis-behave in anyway. Neither will it prevent follow up error. It simple skips informing the user, yet fixes nothing. Leave on true, unless you get repeatedly the same internal error, and have tested well, that it does not affect you. (Then the warning dialog would be annoying, and you may want to skip it)
TimeOutForEval/WarnOnTimeOut
Read GDB_Debugger_Tips#TimeOuts

Event Log

General

Eventually logging info should go the the event log, for now it is show in the debug output window.

Messages

The Messages window is usually positioned below the source editor and shown, when building the project. It shows the compiler output and can show the output of external tools.

See IDE Window: Messages.

Language Exceptions

Moved to: IDE_Window:_Breakpoints

See also

Help

IDE Options - Help - Help Options

(Help for this tab should be presented in hints, because when nothing is yet configured...)

Help Options

HTML browser

CHM Help viewer
CHM help should be preconfigured if you installed Lazarus via an installer. See details on downloading/checking/configuring CHM help.

Databases

Whenever the help is invoked, databases will be scanned for help information

RTLUnits

FCLUnits

Free Pascal Compiler Messages

LazUtilsUnits

FPC Language Reference

LCL - Lazarus component library

Free Pascal Compiler Directives

External help