PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • The debugger
  • How to proceed?
  • Starting the debugger
  • Note: Minimizing (or not) the editor during the test
  • Using the debugger in 32 bits and 64 bits
  • Running code in the debugger
  • Configuring the stop mode of debugger
  • Notes
  • Hierarchy of processes
  • Viewing the content of variables
  • Expression to evaluate
  • HFSQL status report and WLanguage status report
  • Managing threads
  • Ignorint some functions during "step by step" debugging
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 launching the application. This solution allows you to monitor the progress of the application.
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.
Note: WINDEV, WEBDEV and WINDEV Mobile include several trace tools (trace window, information box, ...). See Debugging without debugger for more details.
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 the variables can be viewed:
  • Individually in the rollover tooltip of each variable.
  • In the "Debugger" pane ( to view the local variables and to view the global variables).
How to proceed?

Starting the debugger

Several methods can be used to start the debugger:
  • At the beginning of the project test by selecting "Project .. Test mode .. Trace the project". The debugger is started when the project is run.
    This method is recommended if you want to check the initialization processes of the project and the initialization processes of first window or page.
    At the beginning of project test: on the "Project" pane, in the "Test mode" group, expand "Test mode" and select "Trace the project". The debugger is started when the project is run.
    This method is recommended if you want to check the initialization processes of the 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 the icon shaped like a hand ( ).
  • By programming by adding the Stop keyword into the code 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.
    Note: The Stop keyword is taken into account during the application tests in the editor of WINDEV/WINDEV Mobile/WEBDEV. When using the executable, the Stop keyword is ignored.
  • In the code editor by adding a breakpoint into the code at the location from which the debugger must be started. See Managing breakpoints for more details.
  • From an expression entered in the "Debugger" pane. See Expression to evaluate for more details.
Versions 18 and later

Note: 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 code editor".
  2. In the "Debugger" tab, uncheck "Minimize the editor in test mode".
  3. Validate.
New in version 18

Note: 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 code editor".
  2. In the "Debugger" tab, uncheck "Minimize the editor in test mode".
  3. Validate.

Note: 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 code editor".
  2. In the "Debugger" tab, uncheck "Minimize the editor in test mode".
  3. Validate.
Versions 16 and later

Using the debugger in 32 bits and 64 bits

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
Notes:
  • 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, all you have to do is select "Project .. Test mode .. Debug the element 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 the element in 64 bits".
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 bits.
New in version 16

Using the debugger in 32 bits and 64 bits

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
Notes:
  • 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, all you have to do is select "Project .. Test mode .. Debug the element 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 the element in 64 bits".
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 bits.

Using the debugger in 32 bits and 64 bits

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
Notes:
  • 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, all you have to do is select "Project .. Test mode .. Debug the element 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 the element in 64 bits".
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 bits.

Running code in the debugger

Once the debugger is enabled, each operation performed in the application positions the cursor of the debugger (represented by the arrow) on the code currently run. You can now continue the code execution:
  • 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).
WEBDEV - Server code Only the server 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 line and the code of procedures called by this line. The execution of line and the execution of procedures called by the line will be viewed in the debugger.
  • The [F8] key to run the code of line and the code of procedures called by this line. Only the execution of line will be viewed in the debugger.
Versions 23 and later
Note: 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
Note: 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.
Note: 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 cursor of the debugger (arrow) is positioned on the current line. The input cursor of the mouse (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 code while ignoring the breakpoints, click the icon.
Note: To stop the code execution in the debugger, click the icon. 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, perform the requested modification 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 ("Tools .. Options .. Options of code editor", "Debugger" tab).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 code editor".
  2. Display the "Debugger" tab.
Notes

Hierarchy of processes

The processes currently run in the debugger are organized hierarchically. This hierarchy is listed in the call stack in the "Debugger" pane.
For example, the initialization process of application starts a window that is using 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.
Note: 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 view the local variables.
    • The icon is used to view the global variables.
    • You can view the content of variables in hexadecimal format.
The debugger also proposes an extended view mode. This mode allows you to view the Table, Structure or Object data as an array of results. For example, a class can contain a member being an object itself. In this case, a double-click performed on an object (like when editing a simple variable) opens a window containing all the members of this object. You have the ability to click an element again to view its content and/or modify it.
Versions 16 and later
Watch window
The content of the variables can be viewed 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 content of the variable 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 the variables can be viewed 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 content of the variable 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 the variables can be viewed 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 content of the variable 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, all you have to do is define the following expression as being auto-stop:
Customer.CustNum = 12345
To insert an expression:
  1. Select "Add an expression" from the popup menu of the "Debugger" pane.
  2. Enter the new expression.
  3. Validate the creation of expression by pressing the [Enter] key. 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 the expression.
  4. Validate the modification 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: all you have to do is check the "Stop" column in front of the requested expression.

HFSQL status report and WLanguage status report

The HFSQL status report ( icon) is used to display the result of the following HFSQL functions (if they exist) in the "Debugger" pane:
Note: From version 19, HFSQL is the new name of HyperFileSQL.
The WLanguage status report ( icon) is used to display the following information in the "Debugger" pane:
  • the timer number (if it exists),
  • the number and the message of non-fatal errors,
  • the name of 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.
Versions 23 and later

Ignorint some functions during "step by step" debugging

During the step-by-step debugging, it is sometimes necessary not to debug the content of some functions (a log function or a conversion function for example).
To do so, the declaration of function, procedure or method must be followed by the <without step by step> extension attribute.
For more details, see:
New in version 23

Ignorint some functions during "step by step" debugging

During the step-by-step debugging, it is sometimes necessary not to debug the content of some functions (a log function or a conversion function for example).
To do so, the declaration of function, procedure or method must be followed by the <without step by step> extension attribute.
For more details, see:

Ignorint some functions during "step by step" debugging

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