PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Overview
  • The debugger
  • How to?
  • Starting the debugger
  • Remark: Minimizing (or not) the editor during the test
  • Using the debugger in 32 and 64-bit
  • Running code in the debugger
  • Configuring the stop mode of debugger
  • Notes
  • Hierarchy of events/processes
  • Viewing the content of variables
  • Expression to evaluate
  • HFSQL status report and WLanguage status report
  • Managing threads
  • Ignore certain functions when debugging in "Step by step" mode
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 project step by step allows you to start the debugger when starting the application. This solution allows you to monitor the application progress.
Principle of debugging: Debugging an application consists in:
  • checking the operating mode of a process,
  • understanding the operating mode of an existing program,
  • checking the value of variables,
  • checking the operating mode of special cases in an application.
The debugger is used to perform these operations. The debugger also allows you to debug the components used in an application. See Debugging a component for more details.
Remark: WINDEV, WEBDEV and WINDEV Mobile include several trace tools (trace window, information box, ...). See Debugging without debugger for more details.
Versions 25 and later
Android It is now possible to debug Android applications directly from the device.
WEBDEV - Browser code The debugger is now available for browser WLanguage code.
New in version 25
Android It is now possible to debug Android applications directly from the device.
WEBDEV - Browser code The debugger is now available for browser WLanguage code.
Android It is now possible to debug Android applications directly from the device.
WEBDEV - Browser code The debugger is now available for browser WLanguage code.
The debugger
The debugger allows you to trace the WLanguage programs in order to help you improve these programs.
The source code run is viewed on the screen. The processes run are sorted in hierarchical order in the "Debugger" pane.
The value of variables can be viewed:
  • Individually in the on-hover tooltip of each variable.
  • In the "Debugger" pane ( to see local variables and to see global variables).
How to?

Starting the debugger

Several methods can be used to start the debugger:
  • At the beginning of project test: on the "Project" pane, in the "Test mode" group, expand "Test mode" and select "Debug project". The debugger is started when the project is run.
    This method is recommended if you want to check the initialization processes of project and the initialization processes of first window or page.
  • WINDEV When interrupting the test by pressing Ctrl + Pause. The action performed once the Ctrl + Pause keys have been pressed (click on a button, ...) will start the debugger.
  • During the test, by starting the debugger from the code editor. This method is recommended to start the debugger when a process seems to take an unusual long time (endless loop for example). In this case, perform the following operations:
    • Click the WINDEV, WEBDEV or WINDEV Mobile icon in the taskbar.
    • Answer "No" to the question "Do you want to stop the test?".
    • In the "Debugger" pane, click "Pause" .
  • By programming, adding the Stop keyword at the location from which the debugger must be started.
    This method is recommended when the processes from which the debugger must be started is identified.
    Remark: The Stop keyword is only taken into account when testing the application in the WINDEV, WINDEV Mobile or WEBDEV editor. The Stop keyword is ignored when using the executable.
  • In the code editor by adding a breakpoint into the code at the location from which the debugger will be started. See Managing breakpoints for more details.
  • From an expression typed in the "Debugger" pane. See Expression to evaluate for more details.
Versions 18 and later

Remark: 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 editor in test mode".
  3. Validate.
New in version 18

Remark: 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 editor in test mode".
  3. Validate.

Remark: 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 editor in test mode".
  3. Validate.
Versions 16 and later

Using the debugger in 32 and 64-bit

The debugger is available in 32 bits and in 64 bits. All the features are available in these two modes.
WINDEV Tests in WINDEV:
In a WINDEV application, you have the ability to create project configurations for the 32-bit and 64-bit executables. If your computer is equipped with a 32-bit system, the debugger will be run in 32 bits ; if your computer is equipped with a 64-bit system, the debugger will be run in 64 bits.
32-bit system64-bit system
32-bit Executable configuration32-bit GO32-bit GO
64-bit Executable configurationGO! (32 bits)64-bit GO
Component32-bit GO32-bit or 64-bit GO

Remarks:
  • When running a 64-bit project configuration on a 32-bit system, an exclamation mark appears on the GO icon to indicate that the execution will be performed in 32 bits.
  • When running a component, the debugging mode of the element must be specified. This option can be specified via menu of the GO icon of the project ("Debug the element in 64 bits").
WEBDEV - Server code Tests in WEBDEV:
In WEBDEV, if your computer is equipped with a 32-bit system, the debugger will be run in 32 bits. On the contrary, if your computer is equipped with a 64-bit system, the debugger can be run either in 32 bits (by default), or in 64 bits.
To run the tests in 64 bits: on the "Project" pane, in the "Test mode" group, expand "Test mode" and select "Debug in 64-bit".
This option is also available in the drop-down menu below the "Go" icon of the project or below the "Go" icon of an element.
If this option is deselected, the test will be run in 32-bit.
New in version 16

Using the debugger in 32 and 64-bit

The debugger is available in 32 bits and in 64 bits. All the features are available in these two modes.
WINDEV Tests in WINDEV:
In a WINDEV application, you have the ability to create project configurations for the 32-bit and 64-bit executables. If your computer is equipped with a 32-bit system, the debugger will be run in 32 bits ; if your computer is equipped with a 64-bit system, the debugger will be run in 64 bits.
32-bit system64-bit system
32-bit Executable configuration32-bit GO32-bit GO
64-bit Executable configurationGO! (32 bits)64-bit GO
Component32-bit GO32-bit or 64-bit GO

Remarks:
  • When running a 64-bit project configuration on a 32-bit system, an exclamation mark appears on the GO icon to indicate that the execution will be performed in 32 bits.
  • When running a component, the debugging mode of the element must be specified. This option can be specified via menu of the GO icon of the project ("Debug the element in 64 bits").
WEBDEV - Server code Tests in WEBDEV:
In WEBDEV, if your computer is equipped with a 32-bit system, the debugger will be run in 32 bits. On the contrary, if your computer is equipped with a 64-bit system, the debugger can be run either in 32 bits (by default), or in 64 bits.
To run the tests in 64 bits: on the "Project" pane, in the "Test mode" group, expand "Test mode" and select "Debug in 64-bit".
This option is also available in the drop-down menu below the "Go" icon of the project or below the "Go" icon of an element.
If this option is deselected, the test will be run in 32-bit.

Using the debugger in 32 and 64-bit

The debugger is available in 32 bits and in 64 bits. All the features are available in these two modes.
WINDEV Tests in WINDEV:
In a WINDEV application, you have the ability to create project configurations for the 32-bit and 64-bit executables. If your computer is equipped with a 32-bit system, the debugger will be run in 32 bits ; if your computer is equipped with a 64-bit system, the debugger will be run in 64 bits.
32-bit system64-bit system
32-bit Executable configuration32-bit GO32-bit GO
64-bit Executable configurationGO! (32 bits)64-bit GO
Component32-bit GO32-bit or 64-bit GO

Remarks:
  • When running a 64-bit project configuration on a 32-bit system, an exclamation mark appears on the GO icon to indicate that the execution will be performed in 32 bits.
  • When running a component, the debugging mode of the element must be specified. This option can be specified via menu of the GO icon of the project ("Debug the element in 64 bits").
WEBDEV - Server code Tests in WEBDEV:
In WEBDEV, if your computer is equipped with a 32-bit system, the debugger will be run in 32 bits. On the contrary, if your computer is equipped with a 64-bit system, the debugger can be run either in 32 bits (by default), or in 64 bits.
To run the tests in 64 bits: on the "Project" pane, in the "Test mode" group, expand "Test mode" and select "Debug in 64-bit".
This option is also available in the drop-down menu below the "Go" icon of the project or below the "Go" icon of an element.
If this option is deselected, the test will be run in 32-bit.

Running code in the debugger

Once the debugger is enabled, each operation performed in the application positions the debugger cursor (represented by the arrow) on the code currently run. You can now continue to run the code:
  • line by line,
  • by block of lines,
  • by ignoring the breakpoints,
  • by modifying the code to run ("Edit and continue"),
  • by indicating the code line to run (Backspace).
Versions 25 and later
WEBDEV - Server codeWEBDEV - Browser code The server code and browser code can be run.
New in version 25
WEBDEV - Server codeWEBDEV - Browser code The server code and browser code can be run.
WEBDEV - Server codeWEBDEV - Browser code The server code and browser code can be run.
1. Running the code line by line
To run the current code line, use:
  • The F7 key to run the code of the line and the code of the procedures called by this line. The execution of the line and the execution of procedures called by the line will be viewed in the debugger.
  • The F8 key to run the code of the line and the code of the procedures called by this line. Only the execution of the line will be viewed in the debugger.
Versions 23 and later
Remark: If the procedure owns the <without step by step> extension attribute, its code will be ignored when debugging. See Ignoring functions during step-by-step debugging for more details.
New in version 23
Remark: If the procedure owns the <without step by step> extension attribute, its code will be ignored when debugging. See Ignoring functions during step-by-step debugging for more details.
Remark: If the procedure owns the <without step by step> extension attribute, its code will be ignored when debugging. See Ignoring functions during step-by-step debugging for more details.
2. Running code by block of lines
By default, the debugger cursor (arrow) is positioned on the current line. The input mouse cursor (caret) can be positioned on any other code line.
To run the code lines found between the debugger cursor and the caret, press the F6 key.
3. Running code while ignoring the breakpoints
To run the code while ignoring the breakpoints, click on .
Remark: To stop running the code in the debugger, click . The project test continues without debugger.
4. Modifying the code to run
To modify the code to run, modify the code in the project editor when running the test. A window indicates that a test is currently run and it asks whether the test must be stopped. Do not stop the test, make the desired change and resume the test.
5. Running code while specifying the code line to run (Backspace)
You can indicate the line that must be run to the debugger. This code line can be found before or after the code line currently run. This feature is useful if the code to run was modified.
To do so, select "Define the next statement" in the debugger.

Configuring the stop mode of debugger

The stop mode of test (and the stop mode of debugger) can be configured in the display options of code editor:
  1. On the "Home" pane, in the "Environment" group, expand "Options" and select "Options of the code editor".
  2. Display the "Debugger" tab.
Notes

Hierarchy of events/processes

The events/processes currently run in the debugger are organized hierarchically. This hierarchy is listed in the call stack in the "Debugger" pane.
For example, the "Initializing" event of the application starts a window that uses a procedure. When the procedure is debugged, you will have the ability to go back to the code editor:
  • At the location where the procedure is called.
  • At the location where the window is opened.
Remark: This feature does not stop the debugging process.

Viewing the content of variables

The debugger allows you to examine the value of variables used in the current code. The values can be viewed:
  • When a variable is hovered by the mouse cursor.
  • In the debugger:
    • The icon is used to display local variables.
    • The icon is used to display global variables.
    • The content of variables can be displayed in hexadecimal format.
Versions 16 and later
Watch window
The content of variables can be displayed in a specific window: the watch window. To display this window, all you have to do is select "Edit value" from the popup menu of variable in the "Debugger" pane. This window is used to view the content of simple variables as well as the content of structured variables: array, multiline RTF string, structured type of language, class, ...
This window is a non-modal window: you have the ability to open several watch windows on different variables at the same time. These windows can remain opened when debugging the application. These windows are updated for each statement run.
This window also allows you to:
  • View the variable displayed in hexadecimal mode.
  • Save the variable content on disk (interesting for an RTF, HTML or Image variable).
  • Display an image found in a variable or in a memo.
  • Add the content of an RTF or HTML variable in formatted format.
New in version 16
Watch window
The content of variables can be displayed in a specific window: the watch window. To display this window, all you have to do is select "Edit value" from the popup menu of variable in the "Debugger" pane. This window is used to view the content of simple variables as well as the content of structured variables: array, multiline RTF string, structured type of language, class, ...
This window is a non-modal window: you have the ability to open several watch windows on different variables at the same time. These windows can remain opened when debugging the application. These windows are updated for each statement run.
This window also allows you to:
  • View the variable displayed in hexadecimal mode.
  • Save the variable content on disk (interesting for an RTF, HTML or Image variable).
  • Display an image found in a variable or in a memo.
  • Add the content of an RTF or HTML variable in formatted format.
Watch window
The content of variables can be displayed in a specific window: the watch window. To display this window, all you have to do is select "Edit value" from the popup menu of variable in the "Debugger" pane. This window is used to view the content of simple variables as well as the content of structured variables: array, multiline RTF string, structured type of language, class, ...
This window is a non-modal window: you have the ability to open several watch windows on different variables at the same time. These windows can remain opened when debugging the application. These windows are updated for each statement run.
This window also allows you to:
  • View the variable displayed in hexadecimal mode.
  • Save the variable content on disk (interesting for an RTF, HTML or Image variable).
  • Display an image found in a variable or in a memo.
  • Add the content of an RTF or HTML variable in formatted format.

Expression to evaluate

The debugger allows you to insert an expression to evaluate. This expression can have any type: variable, function, operation on variables, ... The expression result is calculated and displayed.
This expression is used to perform a custom debugging. For example, you can find out the content of a variable while it is being used in the application.
An expression can be self-stopping: the debugger can start as soon as a condition is checked or when the value of a variable is modified.
For example, in a mailshot sent to 40 000 customers, a problem occurs on number 12345. To start the debugger as soon as the customer number is equal to 12345, simply define the following expression as self-stopping:
Customer.CustNum = 12345
To insert an expression:
  1. Select "Add an expression" from the popup menu of the "Debugger" pane.
  2. Type the new expression.
  3. Press the Enter key to validate the creation of expression. The expression value will be automatically displayed in the "Value" column when debugging.
To modify an expression:
  1. Select the expression to modify.
  2. Select "Edit the expression" from the popup menu of "Debugger" pane.
  3. Modify expression.
  4. Validate modifications by pressing the Enter key. The expression value will be automatically displayed in the "Value" column when debugging.
To delete an expression:
  1. Select the expression to delete.
  2. Select "Delete the expression" from the popup menu of "Debugger" pane. The expression is deleted.
To make an expression self-stopping: simply check the "Stop" column in front of the desired expression.

HFSQL status report and WLanguage status report

The HFSQL status report ( ) is used to display the result of the following HFSQL functions (if they exist) in the "Debugger" pane:
Remark: From version 19, HFSQL is the new name of HyperFileSQL.
The WLanguage status report ( ) is used to display the following information in the "Debugger" pane:
  • timer number (if it exists),
  • number and message of non-fatal errors,
  • name of the current object (corresponding to the MySelf keyword).

Managing threads

You have the ability to debug a multi-threaded application. When a breakpoint or a STOP statement is reached, you can:
  • See the different threads.
  • Switch to the information about the different threads (call stack, variables, ...) via the combo box found in the "Debugger" pane.

Ignore certain functions when debugging in "Step by step" mode

Versions 23 and later
During step-by-step debugging, it is sometimes necessary not to debug the content of some functions (e.g. a log function or a conversion function).
To do so, the declaration of function, procedure or method must be followed by the <no step into> extension attribute.
For more details, see:
New in version 23
During step-by-step debugging, it is sometimes necessary not to debug the content of some functions (e.g. a log function or a conversion function).
To do so, the declaration of function, procedure or method must be followed by the <no step into> extension attribute.
For more details, see:
During step-by-step debugging, it is sometimes necessary not to debug the content of some functions (e.g. a log function or a conversion function).
To do so, the declaration of function, procedure or method must be followed by the <no step into> extension attribute.
For more details, see:
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment