PC SOFT

WINDEV的在线文档

  • Overview
  • Configuring the remote computer
  • Configuring WDDebug
  • Running and debugging the executable on a remote computer
  • Debugging an executable that is already run on a remote computer
  • Starting the debugger and stopping the test
  • Starting the debugger
  • Stopping the test
  • Advanced setting of debugging ports
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系: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本地访问

Running the test of a WinDev project and debugging it on the user computer

Overview
Several methods can be used to run the test of a project and to debug it on the development computer (see Running the test of a WinDev executable on the development computer and debugging it). However, in some cases, you may have to debug on the end-user computer (connected by network or by Internet).

From your office in London, you have the ability to debug an application that is run in Taiwan. The debug operation is performed without having to go anywhere, directly on the configuration of the user.

Two features are available:

  • Running and debugging the executable on a remote computer
  • Debugging an application that is currently run on a remote computer.
For these two features, a specific configuration is required for the remote computer.

Note: To debug a WinDev application remotely, the WinDev application must include the wdxxxcpl.dll library in its framework.

Configuring the remote computer
To debug a WinDev application on a remote computer, you must:
  • open the ports 27270 and 27280 if a firewall is used. Indeed, the communication between the development computer and the end-user computer is done via sockets. These ports can be customized. See "Advanced setting of debugging ports" in this page.
  • install and start WDDebug on the end-user computer. WDDebug can be supplied with the application (application available in the additional modules when creating the setup).
    Note: on a 64-bit computer, the WDDebug64 application must be started.
Notes:
  • WDDebug (32-bit version and 64-bit version) is an application that can be supplied separately. A setup pack is available in the "Install\WDDebug" sub-directory of the setup directory of WinDev (WX190PACKWDDEBUG.exe). Caution: WDDebug can only be used on the computers running Windows 2000 or later.
  • On a TSE session, WDDebug does not list the executables of the other sessions available on the computer. You cannot trace an executable started on the console from a TSE session on the computer.
  • To start WDDebug on the development computer:
    • the 32-bit version (WDDebug.exe) is available in the "\Programs" directory of the setup directory of WinDev.
    • the 64-bit version (WDDebug64.exe) is available in the "\Programs\Framework\Win64x86" directory of the setup directory of WinDev.

Configuring WDDebug

To debug a WinDev application on a remote computer, WDDebug must be configured by the end user:
  • "Allow the remote debugging for the applications and services currently run" must be checked in order to be able to debug an application (or a service) currently run. The list of WinDev applications currently run is displayed. The application to debug must be selected from this list.
  • "Allow to start and to remotely debug an application" gives you the ability to remotely start and debug the specified application. In this case, the full name of the application as well as its command line must be specified (if it exists).
  • "Allow the application to be restarted" allows you to transfer the information regarding an application currently run into the parameters in order to allow the application to be started. Indeed, the developer may want to restart the application in order to reproduce the bug.
  • "Allow to start and debug a service remotely" gives you the ability to remotely start and debug the specified service.
Caution: You cannot debug several executables or services simultaneously on the same machine from several remote computers (for example, two developers who try to debug two different applications at the same time on the same remote computer).

Running and debugging the executable on a remote computer
To run and debug an executable on a remote computer:
  1. Open the relevant project in WinDev.
  2. Contact the user in order to configure his computer.
  3. Select "Project .. Test mode .. Run and debug the executable on a remote computer".On the "项目" pane, in the "测试模式" group, expand "测试模式" and select "Start and debug the executable on a remote computer".
  4. In the window that is displayed, enter the name or IP address of the remote computer and click the "Refresh" button. The name of the application to debug is displayed. This name corresponds to the application specified by the end user.
  5. Validate.
  6. The application is started in debug mode on the user computer. The user can handle the application while you can follow the code run via the debugger (by including breakpoints in the sections of code where the problems occur).
Note: Therefore, the code of the current project in the editor and the code of the executable can become out-of-sync: the out-of-sync code is highlighted in pink during the debug operation.

Debugging an executable that is already run on a remote computer
To debug an executable that is already run on a remote computer:
  1. Open the relevant project in WinDev.
  2. Contact the user in order to configure his computer.
  3. Select "Project .. Test mode .. Run and debug the executable on a remote computer".On the "项目" pane, in the "测试模式" group, expand "测试模式" and select "Start and debug the executable on a remote computer".
  4. In the window that is displayed, enter the name or IP address of the remote computer and click the "Refresh" button. The list of applications available on the remote computer is displayed.
  5. Select the requested application and validate.
  6. The application is in debug mode.

Starting the debugger and stopping the test

Starting the debugger

To start the debugger while running the test of the executable, use the editor:
  • In the "Code" pane, "Debugger" option, 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.

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: In the editor, stop the debugger () or SHIFT + F5

Advanced setting of debugging ports
If you do not want to use the debugging ports proposed by default, you have the ability to configure the debugging ports in the registry.

The ports must be configured on the development computer and on the debugging computer.

On the development computer: In the "HKEY_CURRENT_USER\SOFTWARE\PC SOFT\WINDEV\20.0\Common" registry, create the following "DWORD 32 Bits" value: "DBG_Port_COM". This value contains the number of the communication port on the server.

On the computer where the debug operation must be performed:

  1. Create the "HKEY_CURRENT_USER\SOFTWARE\PC SOFT\WDDEBUG\20.0" key if necessary.
  2. In the "HKEY_CURRENT_USER\SOFTWARE\PC SOFT\WDDEBUG\20.0" registry, create the following "DWORD 32 Bits" value: "DBG_Port_COM". This value contains the number of the communication port on the server. It must be identical to the value specified on the development computer.
  3. In the "HKEY_CURRENT_USER\SOFTWARE\PC SOFT\WDDEBUG\20.0" registry, create the following "DWORD 32 Bits" value: "DBG_Port_DBG". This value contains the number of the debugging port.
    This port must be allowed in the firewall of the client computer.
Note: These parameters are taken into account when starting WDDebug.