In this article:
Running is a basic operation that is used to test application code and work functions of forms/web forms.
Two modes of object running are available in the development environment:
Run without debugging.
Run with debugging.
Before running, the system checks code syntax, and compiles the current development environment object, and if required, all related objects. Objects are recompiled if the last compilation time changes and the object is saved. Compiled objects are saved to assemblies cash and are started from there. In the desktop application the selected compilation method is taken into account: standard application or web application. If there are any errors or mismatches, corresponding compiler message is generated.
Development may result in the situation when the same user is used in different sessions to compile and start a main unit connected to other units. If the connected units have the code changed, the session that was compiled faster than other unit versions will be loaded to assembly cache during compilation. The other session will find and use updated files from assembly cache. They will not be recompiled. If unit code is incompatible in different sessions, a compilation error occurs.
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:
Select the Debug > Run without Debugging main menu item.
Press CTRL+SHIFT+F9.
In the desktop application click the
Run without Debugging button on the Debug toolbar.
In the web application click the
Run without Debugging button on the toolbar.
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 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. One can also debug the development environment object that can be used by some repository object.
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:
Put the cursor to the required line and press F5.
Put the cursor to the required line and select the Toggle Breakpoint context menu item.
Put the cursor to the required line and select the Debug > Toggle Breakpoint main menu item.
Click the red round marker of breakpoint next to the required line in the tab area and breakpoints (the area to the left of the working area). Right-click on the marker to open the Breakpoint Parameters dialog box.
To run an object opened in the development environment with debugging, execute one of the following operations:
Select the Debug > Run main menu item.
Press F9.
In the desktop application click the
Start Code Execution button on the Debug toolbar.
In the web application click the
Start Code Execution button on the toolbar.
Select the Run context menu item of the corresponding object in the project navigator.
When reaching a breakpoint code execution is paused and the currently executed line is highlighted in green. The object opens in the debug mode.
Web form behavior depends on the value of the modal property that is set in the form designer mode. If the property is set to True, the form is started modally relative to the current browser tab. Debug mode is indicated in the form title as a green icon and also in the browser tab title.
We form title:

Browser tab title:

The
button can be used to collapse web form contents to view code. The button is available in web form execution mode and in debug mode.
If the modal property is set to False, the web form opens in a new tab, and debug mode is indicated only in the development environment tab title.
When reaching a breakpoint and code execution is paused, the icon turns red in the form title and browser tab title. If the web form is opened in a separate tab, go to the development environment tab for debugging.
Debug mode gives access to various development environment tools for checking code performance:
To control the code progress in the debug mode, use the following commands:
/
- Step Over. Executes the current string stepping over nested custom methods. It is also available by pressing F8.
/
- Run. Execute the current line, step in nested custom methods and execute them step by step. It is also available by pressing F7.
/
- Run until Return. Execute code until it returns to the breakpoint. It is also available by pressing SHIFT+F11.
These commands are available in the Debug main menu and also on the toolbar. The main menu in the desktop application 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, the object will open in the debug mode in case of errors, the line with the error will be focused.
Features of starting various development environment objects are described in the following subsections:
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 generates debug info but this info will not be available without the help of additional software or without changing certain settings that may also affect system work and performance.
For details see the subsections:
See also: