PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Performing a dynamic audit from the development environment
  • Starting a dynamic audit during the project test
  • Starting a dynamic audit during the automatic tests
  • Performing a dynamic audit in the deployed application
  • Overview
  • Starting a dynamic audit by programming
  • Starting a dynamic audit by using the ".WX" file
  • Starting a dynamic audit in an application currently run
  • Examining a dynamic audit
  • Opening the status report of the dynamic audit
  • Window for analyzing a dynamic audit
  • Types of events collected by the dynamic audit
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
The dynamic audit of an application is used to study its performances at run time. A dynamic audit can be performed in a test environment or on a live application. The audit is used to detect problems such as:
  • Excessive memory consumption.
  • Slowness of algorithms used.
  • Errors "hidden" at run time.
  • ...
A dynamic audit can be performed:
Then, the status report of dynamic audit can be viewed and analyzed in the project editor.
Performing a dynamic audit from the development environment
The dynamic audit can be started:

Starting a dynamic audit during the project test

Versions 19 and later
1. Automatic dynamic audit
During each window or project GO, a dynamic audit is performed in background task, without slowing down the execution. When the test is ended, the number of problems that occurred is displayed in the "Dynamic audit" Widget of the Project dashboard.
Dnamic Audit widget
To see the detailed status report, all you have to do is click the Widget.
To disable this automatic dynamic audit:
  1. Click the Widget arrow.
  2. Uncheck "Dynamic audit enabled".
In this case, no audit will be performed during a test via a simple GO: the dynamic audit will have to be explicitly started during the project test.
New in version 19
1. Automatic dynamic audit
During each window or project GO, a dynamic audit is performed in background task, without slowing down the execution. When the test is ended, the number of problems that occurred is displayed in the "Dynamic audit" Widget of the Project dashboard.
Dnamic Audit widget
To see the detailed status report, all you have to do is click the Widget.
To disable this automatic dynamic audit:
  1. Click the Widget arrow.
  2. Uncheck "Dynamic audit enabled".
In this case, no audit will be performed during a test via a simple GO: the dynamic audit will have to be explicitly started during the project test.
1. Automatic dynamic audit
During each window or project GO, a dynamic audit is performed in background task, without slowing down the execution. When the test is ended, the number of problems that occurred is displayed in the "Dynamic audit" Widget of the Project dashboard.
Dnamic Audit widget
To see the detailed status report, all you have to do is click the Widget.
To disable this automatic dynamic audit:
  1. Click the Widget arrow.
  2. Uncheck "Dynamic audit enabled".
In this case, no audit will be performed during a test via a simple GO: the dynamic audit will have to be explicitly started during the project test.
2. Dynamic audit explicitly started
To explicitly start a dynamic audit during the project test:
  1. Open the project to analyze.
  2. Select "Project .. Test mode .. Debug the project while the audit is enabled". The project starts.On the "Project" pane, in the "Test mode" group, expand "Test mode" and select "Debug the project while the audit is enabled". The project starts.WINDEV Mobile The dynamic audit can only be started in simulator mode ("Project .. Test mode .. Debug the project while the audit enabled (simulator)". WINDEV Mobile The dynamic audit can only be started in simulator mode. To start this audit, on the "Project" pane, in the "Test mode" group, expand "Test mode" and select "Debug the project with the audit enabled (simulator)".
  3. Handle the project in order to use the features that must be audited.
  4. Close the application.
The editor opens the report window of the dynamic audit. The status report of dynamic audit is also displayed in the "Debugger trace" pane.
Versions 16 and later

Starting a dynamic audit during the automatic tests

To start a dynamic audit during the automatic tests:
  1. Open the project to analyze.
  2. Select "Automatic tests .. Enable the dynamic audit during the automatic tests".On the "Automatic tests" pane, in the "Tests" group, expand "Run" and select "Enable the dynamic audit during the automatic tests".
The dynamic audit will be performed when an automatic test is run. The report window of the dynamic audit is displayed at the end of test. The status report of dynamic audit is also displayed in the "Debugger trace" pane.
New in version 16

Starting a dynamic audit during the automatic tests

To start a dynamic audit during the automatic tests:
  1. Open the project to analyze.
  2. Select "Automatic tests .. Enable the dynamic audit during the automatic tests".On the "Automatic tests" pane, in the "Tests" group, expand "Run" and select "Enable the dynamic audit during the automatic tests".
The dynamic audit will be performed when an automatic test is run. The report window of the dynamic audit is displayed at the end of test. The status report of dynamic audit is also displayed in the "Debugger trace" pane.

Starting a dynamic audit during the automatic tests

To start a dynamic audit during the automatic tests:
  1. Open the project to analyze.
  2. Select "Automatic tests .. Enable the dynamic audit during the automatic tests".On the "Automatic tests" pane, in the "Tests" group, expand "Run" and select "Enable the dynamic audit during the automatic tests".
The dynamic audit will be performed when an automatic test is run. The report window of the dynamic audit is displayed at the end of test. The status report of dynamic audit is also displayed in the "Debugger trace" pane.
Performing a dynamic audit in the deployed application

Overview

The dynamic audit can be started:
  • by programming.
  • WINDEV via the WX file.
  • WINDEV via a key combination.

Starting a dynamic audit by programming

To start a dynamic audit by programming, all you have to do is use dbgEnableAudit.
The audit generates a ".wdaudit" file. This file must be loaded in the development environment in order to study the result.
Note: To study the result of application audit, the project corresponding to this application must be opened in WINDEV, WINDEV Mobile or WEBDEV.
AndroidAndroid Widget Java This feature is not available.
WINDEV

Starting a dynamic audit by using the ".WX" file

You also have the ability to audit an application in its production environment without modifying the executable: All you have to do is create, in the directory of the executable, a file named like the executable and whose extension is ".WX".
This file will have the following format:
[AUDIT]
ACTIVE = 1 (or 0 to disable the audit)
FILE = <path of the .waudit file to generate>
OPTION = <combination of the options of dbgEnableAudit>
In this file, the OPTION key can take the following values:
  • "CA": The audit comments are written into the dynamic audit.
  • "WA": The execution warnings regarding the detected anomalies are written into the dynamic audit.
  • "WP": The execution warnings regarding the performances are written into the dynamic audit.
  • "EA": The assertions are written into the dynamic audit.
  • "ER": The non-fatal errors not processed are written into the dynamic audit.
  • "EX": The fatal errors, processed by WHEN EXCEPTION or not processed, are written into the dynamic audit.
These options must be preceded by the "+" sign to specify that they must be taken into account. Example: OPTION=+CA+WA+WP
The audit generates a ".wdaudit" file, this file must be loaded in the development environment in order to study the result.
Note: To analyze the result of an application audit, the project corresponding to this application must be opened in WINDEV or WEBDEV.
WINDEV

Starting a dynamic audit in an application currently run

To start recording a runtime audit, press CTRL + ALT + A. This shortcut operates like the call to dbgEnableAudit.
Examining a dynamic audit

Opening the status report of the dynamic audit

The status report of the dynamic audit is a file whose extension is ".waudit".
To open this file, you can:
  • Open the file in the editor directly: on the "Home" pane, in the "General" group, click "Open" and select the audit file.
  • Versions 19 and later
    use the "Dynamic audit" widget of the project dashboard: click the arrow of the widget and select "Open an audit". Then, select the audit file.
    New in version 19
    use the "Dynamic audit" widget of the project dashboard: click the arrow of the widget and select "Open an audit". Then, select the audit file.
    use the "Dynamic audit" widget of the project dashboard: click the arrow of the widget and select "Open an audit". Then, select the audit file.

Window for analyzing a dynamic audit

When loading a dynamic audit, the following window is displayed:
Result of a dynamic audit
  • 1: Name of the audit file currently analyzed.
  • 2: Period of time during which the audit was performed.
  • 3: Selecting the period of time to view. The range slider can be used to browse part of the audit when this one was performed on a long period of time. The range slider covers the entire duration of the audit. The active section of the control (modifiable with the arrow keys) is displayed below. This area can be clicked and it automatically selects the event closest to the moment that was clicked (in the list of events).
  • 4: Display mode of audit events. The audit events can be displayed in in a chronological order in the list of events or they can be grouped by family of events
  • 5: Filtering button used to choose the types of events that will be displayed.
  • 6: List of events displaying all the elements collected by the audit. On each table row:
    • a "..." button is used to access the event details.
    • if the event is linked to a specific code line, the "Code" button is used to directly open the code editor at the corresponding location.
    • Versions 19 and later
      the "-" button is used to disable the error. CAUTION: The error will no longer be displayed if it is disabled. It cannot be re-enabled.
      New in version 19
      the "-" button is used to disable the error. CAUTION: The error will no longer be displayed if it is disabled. It cannot be re-enabled.
      the "-" button is used to disable the error. CAUTION: The error will no longer be displayed if it is disabled. It cannot be re-enabled.

Types of events collected by the dynamic audit

The different types of events collected by the dynamic audit are:
  • The exceptions: an exception is a fatal error of the application (unless it is intercepted in a WHEN EXCEPTION block). An exception can be voluntarily generated by ExceptionThrow.
    All the exceptions are reported by the dynamic audit (exceptions processed by programming or exceptions that have stopped the application). In most cases, an exception is the result of a programming error.
  • Errors: an error can be triggered by a WLanguage function to signal the failure of an operation (for example, fDelete returns an error if the deletion of the requested file failed). The errors can also be triggered by the developer via ErrorThrow.
    In most cases, an error is caused by an invalid action of the application user or by a failure in the application environment.
  • The runtime warnings: these warnings are reported by some WLanguage functions to signal a potential problematic behavior but that causes no error. For example, if the WLanguage detects a performance problem in the code of the application.
    Examples of runtime warning:
    • Versions 20 and later
      Using zipExtractFile in a loop to extract an important number of files from a Zip or 7z archive is not very efficient. We recommend that you use zipExtractFileList.
      New in version 20
      Using zipExtractFile in a loop to extract an important number of files from a Zip or 7z archive is not very efficient. We recommend that you use zipExtractFileList.
      Using zipExtractFile in a loop to extract an important number of files from a Zip or 7z archive is not very efficient. We recommend that you use zipExtractFileList.
    • Versions 22 and later
      Possible improvements on the Chart controls: activation of anti-aliasing, use of labels inside pie sections, ...
      New in version 22
      Possible improvements on the Chart controls: activation of anti-aliasing, use of labels inside pie sections, ...
      Possible improvements on the Chart controls: activation of anti-aliasing, use of labels inside pie sections, ...
    • Versions 22 and later
      Access to controls not recommended from the secondary threads.
      New in version 22
      Access to controls not recommended from the secondary threads.
      Access to controls not recommended from the secondary threads.
  • The assertions: the runtime audit reports all the calls to dbgAssert in which the condition turned out to be False.
  • The debugging events: these events are triggered by the call to the debugging functions (dbgSaveMemoryDump for example).
Minimum required version
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment