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

Files

Max recent files

The maximum number of items in the open recent file menu.

Max recent project files

The maximum number of items in the open recent project menu.

Open last project on start

Enable to automatically reopen the last edited project on IDE start

Show compile dialog

If enabled, you will see a compile 'progress' dialog appear while your project is being compiled. It will also show a summary of the total lines compiled, number of hints, warnings etc.

Lazarus directory

Set here the directory of the Lazarus source directory. The Lazarus source directory contains directories like 'ide', 'debugger', 'converter', 'components' and 'lcl'. It is used to find sources (.pas) of the LCL and components.

Compiler path

This must be the full filename of the used compiler. For example /usr/bin/ppc386 under Linux or /usr/local/bin/ppc386 (32 bit) or /usr/local/bin/ppcx64 (64 bit) under macOS or C:\pp\ppc386.exe under Windows. The filename depends on how the compiler was installed.

FPC Source directory

Set here the directory of the Free Pascal source directory. The source directory contains directories like 'compiler', 'packages', 'rtl' and 'fcl'. Typically under Linux/*BSD/MacOSX this is found at /usr/share/fpcsrc/.

Note: Do not confuse this with the FPC unit/library directory (.../units/i386-win32/), that only contains the compiled .ppu files and has a totally different structure.

Make path

Set here the filename of the make tool. Leave blank to let the IDE use the default. The make tool is a utility used by many projects to help compiling big sources and is therefore installed on almost all Linux and macOS systems by default. The Lazarus Windows installer installs a version too. Under BSD use gmake. See here for more information make.

Delphi installs a make executable too, which is incompatible with gnu make and which cannot be used for Lazarus. Don't leave this option blank if the make from Delphi os on the path.

Directory for building test projects

When a newly created project is not yet saved and you build it, the IDE saves the whole project into this directory and builds it there.

General

Language

The language of all text of the IDE. You should restart the IDE to make sure all text is reloaded.

Mouse Action

Auto Save

Desktop files

Load or save the environment options to/from a file.

Check changes on disk with loading

When the IDE checks if some editor files changed on disk it normally only compares the file date. To also load the file and compare the content, enable this option.

Hints for component palette

Show hints, when mouse is over the component palette.

Hints for main speed buttons

Show hints, when mouse is over the buttons of the main IDE bar window. (e.g. buttons for open, save)

Window

Hide IDE windows on run

When running the project, all IDE windows are hidden and restored when program stops.

Hide message icons

Normally the Messages window prepends an icon to each message so you can quickly see what type it has or if the IDE can quick fix the message. If you don't want the icons, enable this option.

IDE title starts with project name

Normally the IDE uses as its caption in the taskbar (the panel at top or the bottom of your screen) Lazarus IDE vX.Y.Z - project1. Most taskbars are too short and you can only see Lazarus .... Enable this to show the project name first. This can be useful when starting multiple instances of the IDE to work on several different projects at the same time. Since 0.9.29.

Window positions

Fine tune the positions of the IDE windows.

IDE CoolBar

Coolbar is visible

If this checkbox is ticked, then the coolbar will be displayed in the IDE.

Coolbar width

Sets the width of the coolbar. If you add more buttons, you will need to increase this value.

Toolbar grab style

Determines the style of the left-hand coolbar grabbers.

Grab width

Sets the width of the collbar grabbers.

Toolbar border style

Determines whether there is a line between toolbars (default).

The Restore defaults button restores the above settings to their defaults.


The Add button inserts a new toolbar.

The Configure button allows you to add and remove items from a toolbar.

The Delete button deletes the selected toolbar.

The Restore defaults button restores the above settings to their defaults.

Editor ToolBar

Component Palette

Form Editor

Colors

Grid

Guide lines

The guide lines are the lines, showing to which controls the current selection is currently aligned.

Miscellaneous

Object Inspector

Colors

Colors for various property items.

Miscellaneous

Options

Messages Window

Options for the Messages window.

FPDoc Editor

FPDoc files path

Contains paths to FPDoc files with documentation for the units not documented in a project. You can also add paths to the RTL's (*.xml) documentations files, so that tooltip help works for both RTL code.

IDE Startup

The section that controls the IDE startup settings.

Backup

The IDE can create backup files each time it saves a file and an old file exists already.

The options allow to setup the extension and place of backup files.

Hint: Normally it is better to use a version control system like svn or cvs for backups and to disable backups here.

Naming

Default pascal extension

Whenever the IDE creates a pascal unit, it uses this extension as default. The .pas is typical for Delphi users, while .pp is often used for FPC sources and .p is known on Mac computers.

Note: Custom projects can create pascal sources with defined extension. The IDE will not override this.

Ambiguous file action

Before compile the IDE checks if there are ambiguous files. For example it checks if a unit exists twice in the unit path. The compiler will use the first it finds, which might not the intended thing and this gives strange errors. Here you can set the action, what should happen, if the IDE finds such a file.

Save as - auto rename pascal files lowercase

Source code, that compiles on platforms with case sensitive filenames must make sure, that units are written correct. FPC searches first for the unit name with the uses case, then lowercase and finally uppercase. You can either make sure, that the case is written correct in all units, which is hard for windows users, as they don't need to. Or you can let the IDE save all new units lowercase. The source editor will show the unit name as written in the source code, so you see the right case in the IDE anyway.

When a unit is renamed, update references

File Filters

The File / Open File dialog has a list of filters, that can be configured here. Right click on the grid to add and remove items. (Since 0.9.31)

The IDE always adds a few filters:

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