PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Running the test of current project and debugging it
  • Running the test of a project
  • Note: Minimizing (or not) the editor during the test
  • Configuring the test mode
  • Running and debugging the executable on the development computer
  • Debugging an executable that is already run on the development computer
  • Starting the debugger and stopping the test
  • Starting the debugger
  • Stopping the test
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
Running the test of the entire WINDEV project is used to simulate the start of the application by the executable. This allows you to run the test of the entire application, even if its development is not finished yet. As soon as a problem occurs in the execution of the project, the debugger can be started to identify and fix the problem.
WINDEV proposes a complete set of application tests that can be run from the development computer:
Note: The test of a project can be run regardless of the current element in the editor.
Running the test of current project and debugging it

Running the test of a project

To run the test of a project from the editor, select "Project .. Test mode .. Debug the project" ([Ctrl] + [F9]). The editor is automatically minimized and the project is run.To run the test of a project from the editor:
  1. On the "Project" pane, in the "Test mode" group, expand "Test mode" and select "Debug the project" ([Ctrl] + [F9]). You also have the ability to click among the quick access buttons.
  2. If the first project window was not defined, a window is displayed, allowing you to select the first project window.
  3. The editor is automatically minimized and the project is run.
When running the project test, the following processes are run before opening the first project window:
  • 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,
  • taking focus (first window),
  • entering the first control of the first window (if this control has an entry process).
Versions 18 and later

Note: Minimizing (or not) the editor during the test

During a test, the editor is minimized by default. Depending on the hardware configuration (large screen, 2 screens, ....), this minimize operation is not required.
To keep the editor opened:
  1. On the "Home" pane, in the "Environment" group, expand "Options" and select "Options of code editor".
  2. In the "Debugger" tab, uncheck "Minimize the editor in test mode".
  3. Validate.
New in version 18

Note: Minimizing (or not) the editor during the test

During a test, the editor is minimized by default. Depending on the hardware configuration (large screen, 2 screens, ....), this minimize operation is not required.
To keep the editor opened:
  1. On the "Home" pane, in the "Environment" group, expand "Options" and select "Options of code editor".
  2. In the "Debugger" tab, uncheck "Minimize the editor in test mode".
  3. Validate.

Note: Minimizing (or not) the editor during the test

During a test, the editor is minimized by default. Depending on the hardware configuration (large screen, 2 screens, ....), this minimize operation is not required.
To keep the editor opened:
  1. On the "Home" pane, in the "Environment" group, expand "Options" and select "Options of code editor".
  2. In the "Debugger" tab, uncheck "Minimize the editor in test mode".
  3. Validate.

Configuring the test mode

To configure the test mode, select "Project .. Test mode .. Configure the test mode".To configure the test mode, on the "Project" pane, in the "Test mode" group, expand "Test mode" and select "Configuration of test mode".
See Options of test mode for more details.
Running and debugging the executable on the development computer
Some problems can only be reproduced when running the test of 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 run comes from the libraries (and not from the code found in the elements found on the computer). Therefore, the code of the current project and the code of the executable can become out-of-sync: the out-of-sync code is highlighted in pink during the debug operation.
To run and debug the executable:
  1. Open the project associated with the executable in the editor.
  2. Select "Project .. Test mode .. Start and debug the executable".On the "Project" pane, in the "Test mode" group, expand "Test mode" and select "Start and debug the executable".
  3. 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.
  4. Validate. The test is run.
Note: In this mode, InTestMode returns False.
Debugging an executable that is already run on the development computer
Some problems can only be reproduced when running the test of the executable in real-use conditions. This test mode allows you to find a problem that only occurs at run time (and not in test mode). In this case, the code run comes from the libraries (and not from the code found in the elements found on the computer). Therefore, the code of the current project and the code of the executable can become out-of-sync: the out-of-sync code is highlighted in pink during the debug operation.
To debug an executable that is already run:
  1. Open the project associated with the executable in the editor.
  2. A breakpoint can be included in the code that triggers the debugger.
  3. Select "Project .. Test mode .. Debug the executable that is already run".On the "Project" pane, in the "Test mode" group, expand "Test mode" and select "Debug the executable that is already run".
  4. The window that is displayed lists all the WINDEV executables currently run. Select the executable to debug.
  5. Validate. The debugger is linked to the executable run.
Note: In this mode, InTestMode returns False.
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 the [Ctrl] + [Pause] keys. 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.
    • Answer "No" to the question "Do you want to stop the test?".
    • In the "Debugger" pane, click the icon shaped like a hand ( ).
A breakpoint can also be included in the code editor in front of the requested code line. The debugger will be automatically displayed when the corresponding line is run.
See Running a project step by step for more details.

Stopping the test

Several methods can be used to stop the test:
  • 1st method: Close the application whose test is currently run. WINDEV displays the editor that was used at the beginning of test.
  • 2nd method: Go back to the editor with the taskbar or with [Alt] + [Tab] and confirm the ending of the test. WINDEV displays the editor that was used at the beginning of test.
Versions 21 and later
Note: If interface modifications have been made during the project test (resizing controls, modifying their position, ...), at the end of the test, WINDEV proposes to modify the interface of the corresponding windows. See Using the GUI modification during a project test for more details.
New in version 21
Note: If interface modifications have been made during the project test (resizing controls, modifying their position, ...), at the end of the test, WINDEV proposes to modify the interface of the corresponding windows. See Using the GUI modification during a project test for more details.
Note: If interface modifications have been made during the project test (resizing controls, modifying their position, ...), at the end of the test, WINDEV proposes to modify the interface of the corresponding windows. See Using the GUI modification during a project test for more details.
Minimum required version
  • Version 12
Comments
Click [Add] to post a comment