|
|
|
|
|
- Overview
- Testing and debugging the current project
- Testing a project
- Remark: Minimizing (or not) the editor during the test
- Configuring the test mode
- Running and debugging the executable on the development computer
- Debugging an executable already run on the development computer
- Starting the debugger and stopping the test
- Starting the debugger
- Stopping the test
Testing and debugging a project on the development computer
The test of the entire project allows you to simulate the start of the application with the executable. This allows you to test the entire application, even if it is still being developed. When a problem occurs during the execution of the project, you can start the debugger to identify and fix the problem. WINDEV includes an extensive set of application tests that can be run from the development computer: Remark: The test of a project can be run regardless of the current element in the editor. Testing and debugging the current project Testing a project To test a project from the editor: - On the "Project" tab, in the "Test mode" group, expand "Test mode" and select "Debug project" (Ctrl + F9). You also have the ability to click
in the quick access buttons. - If the first project window was not defined, a window is displayed, allowing you to select the first project window.
- The editor is automatically minimized and the project is run.
At the start of the project test, before opening the first window of the project, the following WLanguage events are run: - declaring classes,
- initializing the project,
- declaring the global variables of the first window,
- initializing the first window,
- initializing the controls found in the first window,
- gaining focus (first window),
- entering the first control of the first window (if this control is associated with a WLanguage entry event).
Remark: Minimizing (or not) the editor during the test During a test, the editor is minimized by default. Depending on the hardware configuration (wide screen, 2 screens, etc.), you may not need to minimize the editor. To keep the editor opened: - On the "Home" tab, in the "Environment" group, expand "Options" and select "Options of the code editor".
- On the "Debugger" tab, uncheck "Minimize editor in test mode".
- Validate.
Configuring the test mode To configure the test mode, go to the "Project" tab, "Test mode" group, expand "Test mode" and select "Configure test mode". Running and debugging the executable on the development computer Some problems can only be reproduced when testing the executable in real-use conditions. This test mode allows you to debug an executable once it is installed on the development computer. In this case, the code executed comes from the libraries (and not from the code in the elements on the computer). Therefore, the code from the current project and the code from the executable may be out-of-sync: the out-of-sync code is highlighted in pink during the debug operation. To run and debug the executable: - Open the project associated with the executable in the editor.
- On the "Project" tab, in the "Test mode" group, expand "Test mode", go to "On an executable", and select "Run".
- Specify the options that must be taken into account during the test:
- the executable to run. This executable must correspond to the project opened in the editor.
- the command line to run (if necessary).
- the Windows account that must be used to start the executable. If this account differs from the current user, the user must have been defined on the current computer. His login, his password and his domain must be specified.
- Validate. The test is run.
Debugging an executable already run on the development computer Some problems can only be reproduced when testing the executable in real-use conditions. This test mode allows you to find a problem that only occurs at runtime (and not in test mode). In this case, the code executed comes from the libraries (and not from the code in the elements on the computer). Therefore, the code from the current project and the code from the executable may be out-of-sync: the out-of-sync code is highlighted in pink during the debug operation. To debug an executable that is already run: - Open the project associated with the executable in the editor.
- A breakpoint can be included in the code that triggers the debugger.
- On the "Project" tab, in the "Test mode" group, expand "Test mode, go to "On an executable", and select "Attach to a running executable".
- The window that is displayed lists all WINDEV executables currently run. Select the executable to debug.
- Validate. The debugger is linked to the executable run.
Starting the debugger and stopping the test Starting the debugger Several methods can be used to start the debugger during the test of the executable: - Pressing Ctrl + Pause. The action performed once the Ctrl + Pause keys have been pressed (click on a button, ...) will start the debugger. This method can be used before performing a click on a button for example.
This method can also be used to start the debugger when a long process (containing Multitask statements) seems to loop endlessly. - Starting the debugger from the editor. In this case, perform the following operations:
- Click the WINDEV icon in the taskbar.
- In "Do you want to stop the test?", select "No".
- Go to the "Debugger" pane, "Debug" group, and click the
icon.
A breakpoint can also be included in the code editor in front of the desired line of code. The debugger will be automatically displayed when the corresponding line is run. Once the debugger is running: - the WINDEV code editor displays the "Debugger" tab. The text of the tab is shown in red.
- the status bar is shown in orange.
Stopping the test There are multiple methods to stop the test: - 1st method: Close the application being tested. WINDEV goes back to editor that was open when the test was started.
- 2nd method: Go back to the editor with the taskbar (or press Alt + Tab) and confirm the end of the test. WINDEV goes back to editor that was open when the test was started.
Remark: If changes have been made to the UI during the project test (e.g. resize or move controls), at the end of the test, WINDEV allows you to change the interface of the corresponding windows. For more details, see Using the UI modification during a project test.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|