Lazarus at TU/e: Frequently Asked Questions

A N N O U N C E M E N T S
This FAQ concerns Lazarus 0.9.24.
Also see Getting Started with Lazarus at TU/e.

General Lazarus and IDE Questions:

FreePascal Questions:


General Lazarus and IDE Questions


How do I install Lazarus?

Lazarus 0.9.24 for Windows together with FreePascal 2.2.0 is pre-installed (via full install) on laptops of first-year 2008-2009 students in the Department of Mathematics and Computer Science.

You can check this in het Windows START menu under All Programs: Lazarus should be available in a submenu.

You can install Lazarus yourself:

How do I use the Lazarus IDE?

See Getting Started with Lazarus at TU/e.

What to do if Lazarus fails to work? Are there alternatives?

Unfortunately, we have had instances where even the simplest program fails to run properly from within Lazarus. This is probably related to the debugger. We will look into this issue, but have no solution for Lazarus at the moment. The FreePascal compiler works fine.

Alternatives are:

How can I prevent that Lazaraus closes the command window when my program terminates?

See Running the program in a project.

How to get back the Lazarus Toolbar when stepping through a program?

I consider this a bug.

Workaround. Environment Options ... > Windows: uncheck `Hide IDE windows on run'.

What to do if Run fails

When the program is not yet running and you click Run (or menu Run>Run, or function key F9) to start it, the command window may appear but the program's output does not appear, and the program seems to be stuck.

Workaround. Stop program execution via Run>Stop (Ctrl+F2). Reset the debugger by Run>Reset debugger.

After each run, the debugger should be reset to avoid this problem from reoccuring.

What to do if Step Over fails

When the program is not yet running and you click Step Over (or menu item Run>Step Over, or function key F8) to start it, a dialog window may appear, asking you to locate system.inc. (Bug?) Dismiss this dialog window by clicking `No'.

Workaround. Set a Breakpoint on the first line after the program's first begin (by clicking next to it in the left margin; this should highlight the line in red and mark it with a red bullet). Then Run > Run (F9) the program. After that, you can use Step Over (F8).

Why do I not see the value of a variable when pointing at it?

This sometimes does not work for some variables. (Bug?)

N.B. The program must be active (the Lazarus Toolbar should have (debugging ...) in its title) in order to inspect variables.

Workaround. Put the variable in the Watch List: View > Debug windows > Watches, double click on the topmost empty line, and enter the variable's name next to Expression, click OK.

How can I rename a file in a project?

One should be careful about renaming files that belong to a Lazarus project.

N.B. File names appear in several places, such as the *.lpi Lazarus Project Information file, and (explicitly or implicitly) in uses clauses to indicate dependence on units in other files. When changing a file name, this should usually be done in a consistent manner.

Workaround. Open the file to be renamed in the Source Editor. Use File > Save As ... to save a copy under the changed name. Find (e.g. through the Search menu) other files in the project that somehow reference the old name. Change relevant occurrences to the new name. Remove the old file from the project, and add the new file to the project. Delete the old file or move it outside the project folder, to avoid confusion.

N.B. Opening a file belonging to a project, and removing from/adding to the project can all be done through Project > Project Inspector.


FreePascal Questions:



Feedback about this page is welcome