PC SOFT

WINDEV的在线文档

  • Overview
  • Running the test of the current project and debugging it
  • 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
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

Overview
Running the test of the entire WinDev project is used to simulate the start of the application by the executable. This enables 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 the 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, on the "项目" pane, in the "测试模式" group, expand "测试模式" and select "Debug the project" ([Ctrl] + [F9]). The editor is automatically minimized and the project is run.

When running the test of the project, the following processes are run before the first project window is opened:
  • declaring the 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).

18版本和更高版本
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 the code editor".

2. In the "Debugger" tab, uncheck "Minimize the editor in test mode".

3. Validate.

18新版本
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 the code editor".

2. In the "Debugger" tab, uncheck "Minimize the editor in test mode".

3. Validate.

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 the 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 "项目" pane, in the "测试模式" group, expand "测试模式" 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 enables 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".

2. On the "项目" pane, in the "测试模式" group, expand "测试模式" 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, 模式为测试 returns .

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 enables 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. You have the ability to include a breakpoint in the code that must be debugged.

3. Select "Project .. Test mode .. Debug the already started executable".

2. On the "项目" pane, in the "测试模式" group, expand "测试模式" and select "Debug the already started executable".

4. A window lists all the WinDev executables that are currently run. Select the executable to debug.

5. Validate. The debugger is linked to the executable run.

Note: In this mode, 模式为测试 returns .

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 多任务 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 when starting the test.
  • 2nd method: Go back to the editor with the taskbar or with [Alt] + [Tab] and confirm that the test must be stopped. WinDev displays the editor that was used when starting the test.