In this article:

Running without Debugging

Running with Debugging

Code Execution Diagnostics

Running and Debugging

Running is a basic operation that is used to test application code.

Two modes of object running are available in the development environment:

Before starting, code syntax is checked and compilation of all forms/units/assemblies and objects to which links referred is executed. Compiled objects are saved to assemblies cash and are started from there upon the condition that there no more recent versions of objects and recompilation is not required. The selected compilation method is taken into account. If there are any errors or mismatches, corresponding compiler message is generated.

Running without Debugging

Running without debugging is used to quickly check application functionality without debugging individual code blocks. In this case the object is run within the current application, and performance speed corresponds to work in industrial environments.

To run an object opened in the development environment without debugging, execute one of the operations:

On checking object work without debugging mode, it is available to display debug information to development environment console. Information is displayed by means of static properties and methods of the Debug class.

If an exception is thrown at the runtime, the information message is displayed. The user can work with the running object after closing the error message.

Running with Debugging

Running with debugging is used to check performance of individual code blocks. Objects are run for debugging in an individual process that is why it is more time-consuming than running without debugging. The web application also allows for opening objects for debugging.

To debug code, toggle breakpoints. A breakpoint informs the debugger to pause code execution in the specific line.

To toggle a breakpoint, execute one of the operations:

To run an object opened in the development environment with debugging, execute one of the following operations:

On reaching a breakpoint code execution is paused and the currently executed line is highlighted in green. Object execution switches to debug mode. Debug mode gives access to various development environment tools that enable the user to check code performance:

To control the code progress in the debug mode, use the following commands:

These commands are available in the Debug main menu and also on the Debug toolbar in the desktop application. The main menu also has the Debug > Run to Cursor item that enables the user to continue code execution until the line with the cursor.

NOTE. If the Pause Execution on Exception checkbox is selected in development environment settings, an object will be switched to debug mode if errors occurred, the line with the error will be focused.

Features of starting various development environment objects are described in the following subsections:

Code Execution Diagnostics

When developing a Fore user application the developer can output debug info in the development environment console, operating system event log, files or somewhere else depending on the goals. In some cases the output debug info may be insufficient to find out reasons for incorrect code error behavior or some errors. It this case one can require additional analysis of running processes. The platform core also forms debug info but this info will not be available without the help of additional software or without changing certain settings that may also affect the system work and performance.

For details see the subsections:

See also:

The DebugObject Command | Filling with Code