PC SOFT

WINDEV的在线文档

  • Overview
  • Implementation
  • Enabling the runtime log
  • Activation in the application directly by programming
  • Activation without modifying the application, via a specific file
  • Tips
  • Viewing the runtime log
  • The information displayed in the window of runtime logs is as follows:
  • Compatibility with the earlier versions
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系: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
How to find out which application features are the most frequently used? Use the runtime log. The runtime log is a runtime trace. This log is a simple file (wlog extension) that contains the details of all the operations performed by a user on a WinDev application, WinDev Mobile application or WebDev site:
  • details about the processes called,
  • WLanguage functions with their parameters,
  • user procedures with their parameters,
  • threads,
  • components.
This file allows you to:
  • find out which operations are the most frequently used in the application.
  • find out which processes take the most time.
  • follow the code run during a process that triggers problems (hard to isolate in test mode).
The development team understands which parts of the application are the most frequently used and can focus its resources on the code to optimize.

Implementation

Enabling the runtime log

The activation of the runtime log can be performed:
  • in the application directly, by programming.
  • WinDev without modifying the application, via a specific file

Activation in the application directly by programming

This activation is performed by 调试启用日志. Several WLanguage functions are used to manage the runtime log:
调试启用日志Enables the management of the runtime log.
调试日志状态Allows you to find out and modify the status of the runtime log (enabled, disabled, paused).
调试日志选项Allows you to find out and modify the options of the runtime log.

WinDev

Activation without modifying the application, via a specific file

To do so, create a file named <Executable Name>.WX beside the executable of the application. This file must contain the following lines:

[LOG]
Enabled=<0/1>
File=<Name of WXLOG file>
Option=<Value of options>

Let's take a look at these lines:
  • 活动: This parameter must correspond to 0 to disable the log and to 1 to enable it.
  • File: Name of the log file ("wlog" extension). This name can be built with the following elements:
[%ExeDir%]Directory of the executable, always filled with the "\" character. This directory is equivalent to the result of 文件可执行文件目录.
[%ExeName%]Name of the executable.
[%Date%]Start date of the Log file.
[%Time%]Start time of the Log file.
[%UserName%]Name of the current user.
[%ComputerName%]Name of the computer.
18版本和更高版本
[%DataDir%]
18新版本
[%DataDir%]
[%DataDir%]
Directory of HyperFileSQL data files specified by the user when installing the application. This directory is equivalent to the result of 文件数据库目录.
18版本和更高版本
[%UserDataDir%]
18新版本
[%UserDataDir%]
[%UserDataDir%]
Directory for the data of the current user of the current application. . This directory is equivalent to the result of 文件用户数据目录.
  • Option: Options of the log file.
    • If the options are not specified in the WX file (the OPTION line is missing), the log file is created with the default options: only the WLanguage functions are found in the log file.
    • "" (empty string): Only the processes are stored in the log.
    • "*": the log contains the full information.
    • a combination of values:
      • "+F" to enable the trace for the functions,
      • "+P" to enable the trace for the parameters.

Tips

Depending on the purpose of the runtime log, its implementation as well as the options may change:
  • To find out the most frequently used options of an application, we recommend that you use a simple runtime log (without the details of the functions called). Indeed, the more options you request the larger the runtime log will be.
    WinDev The log can be implemented with the .WX file.
  • To trace a problem that is difficult to reproduce, we recommend that you use the WLanguage functions to implement the runtime log. The runtime log will be enabled at the beginning of the section that is causing problem.

Viewing the runtime log
To view the runtime log in the editor of WinDev, WebDev or WinDev Mobile:
  • Drag and Drop the ".wlog" file to the window editor (on the bar of opened documents for example).
  • open the ".wlog" file directly ("File .. Open").open the ".wlog" file directly.
    Reminder: To open a file from the editor, on the "首页" pane, in the "常规" group, expand "打开" and select the requested file.

To view the runtime log, the current project in the editor must be the project of the application or the project of one of the components used by the application. Only the information regarding the current project will be displayed.

The information displayed in the window of runtime logs is as follows:

  • The general information about the log file: name, application, start date and time, end date and time.
  • The most frequently used elements: three tabs are displayed:
    • Statistics of the elements: Shows the most frequently used elements of your project, with their use time and the number of processes performed. Selecting an element allows you to:
      - see the locations from which an element is used (in the bottom section of the screen)
      - see the elements in the editor ("Show the element" button)
      - access the statistics of the processes ("Statistics of processes" button).
    • Statistics of the processes: Used to get statistics about the time taken by each process. You also have the ability to filter the information about a specific project element.
      The reason for the call is displayed at the bottom of the screen (user action, ...). The sequence of the call can be viewed for the selected element ("Sequence of calls" button).
      The "Show the process code" button is used to display the corresponding WLanguage code in the code editor. Caution: the window for displaying the logs is always found in the foreground.
    • Sequence of calls: Allows you to view the sequence of processes performed in the selected code. The details of the functions used are displayed.
      Additional information can be displayed at the bottom of the screen: Parameters of the procedure, result, ...
      The "Show the call code" button is used to display the calling code. The "Recenter on process" button is used to view the code of the current process.
  • The calls to the procedures and WLanguage functions: Allows you to see all the calls to the WLanguage procedures and functions.
    Additional information can be displayed at the bottom of the screen: Parameters of the procedure, result, ...
    The "Show the process code" button is used to display the corresponding WLanguage code in the code editor. Caution: the window for displaying the logs is always found in the foreground.
  • The interactions between the threads: Allows you to select the thread that will be taken into account and to see the sequence of calls for each thread.

Compatibility with the earlier versions

Caution: The runtime logs created with the version 120034D can no longer be opened: they must be re-created in order to be viewed properly.