Sign in Join
FPDoc Onlineexperiment

Running programs

A compiled program can be run straight from the IDE. This can be done in one of several ways:

  1. select the menu, or

  2. press .

If command line parameters should be passed to the program, then these can be set through the menu. The program parameters dialog looks like figure [fig:params].

Once the program has started, it will continue to run, until

  1. the program quits normally,

  2. an error happens,

  3. a breakpoint is encountered, or

  4. the program is reset by the user.

The last alternative is only possible if the program is compiled with debug information.

Alternatively, it is possible to position the cursor somewhere in a source file, and run the program till the execution reaches the source line where the cursor is located. This can be done by

  1. selecting in the menu,

  2. pressing .

Again, this is only possible if the program was compiled with debug information.

The program can also executed line by line. Pressing will execute the next line of the program. If the program wasn’t started yet, it is started. Repeatedly pressing will execute the program line by line, and the IDE will show the line to be executed in an editor window. If somewhere in the code a call occurs to a subroutine, then pressing will cause the whole routine to be executed before control returns to the IDE. If the code of the subroutine should be stepped through as well, then should be used instead. Using will cause the IDE to execute line by line any subroutine that is encountered.

If a subroutine is being stepped through, then the menu will execute the program till the current subroutine ends.

If the program should be stopped before it quits by itself, then this can be done by

  1. selecting from the menu, or

  2. pressing .

The running program will then be aborted.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.