Running is a basic operation that is used to test application code.
Two modes of object running are available in the development environment:
Run without debugging.
Run with debugging.
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 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.
Click the Run without Debugging button on the Debug toolbar in the desktop application.
Click the Run without Debugging button on the toolbar in the web application.
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. 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:
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.
Click the Start Code Execution button on the Debug toolbar in the desktop application.
Click the Start Code Execution button on the toolbar in the web application.
Select the Run context menu item of the corresponding object in the project navigator.
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:
/ - 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 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:
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: