|
|
|
|
|
- Overview
- Create stop points
- Inserting a breakpoint
- Conditional breakpoint
- Breakpoint without stop but saved in the debug trace
- Breakpoint: Perform Profiling analysis
- Handle breakpoints (delete
- Disabling/Enabling a breakpoint
- Deleting one or more breakpoints
- List stopping points
During a project test in the editor, breakpoints are used to automatically start the debugger from a given line. Inserting a breakpoint Several methods can be used to insert a breakpoint: - Click on the left of the line where the breakpoint must be inserted. The mouse cursor turns into a hand and the sign is displayed.
- On the "Code" tab, in the "Breakpoints" group, expand "Breakpoint" and select "Add a breakpoint".
- Press Ctrl + B.
- Open the context menu of bar for breakpoint management and select "Add a breakpoint".
Remark: The breakpoints are taken into account during the application tests in the editor of WINDEV, WEBDEV or WINDEV Mobile. The breakpoints are ignored when using the executable. Conditional breakpoint When debugging a loop, it may be useful to trigger the debugger after a number of passages (after the 35th iteration for example).
To implement a conditional breakpoint: - Create a breakpoint (Inserting a breakpoint paragraph).
- Display the breakpoint properties:
- via the code editor: On the "Code" tab, in the "Breakpoints" group, expand "Breakpoint" and select "Breakpoint properties".
- via the context menu of breakpoint: Open the context menu of bar for breakpoint management and select "Breakpoint properties".
- In the window that is displayed, in the "Conditions" area, specify the conditions for taking the breakpoint into account:
- Always (default): The breakpoint will not be conditional and it will always be taken into account.
- When the number of times a breakpoint has occurred is: Used to make the breakpoint conditional. To do so, select a condition and the desired number of passages.
- When the expression below is true: Used to make the breakpoint conditional. Simply enter the condition directly in the "If" field.
- Validez. The conditional breakpoint is displayed in the editor ().
Breakpoint without stop but saved in the debug trace In some cases, when debugging an application, it is useful to know the line of code on which the process passed but without stopping in the debugger. In this case, a single information must be displayed in the trace window. To implement this feature: - Create a breakpoint (Inserting a breakpoint paragraph).
- Display the breakpoint properties:
- via the code editor: On the "Code" tab, in the "Breakpoints" group, expand "Breakpoint" and select "Breakpoint properties".
- via the context menu of breakpoint: Open the context menu of bar for breakpoint management and select "Breakpoint properties".
- In the window that is displayed, in the "Actions" area, specify the action to perform during the passage by the breakpoint (these actions can be combined):
- Interrupt execution (default value): the breakpoint interrupts the execution ans starts the debugger on the current line of code.
- Add a message to the debugger trace: the passage by the breakpoint adds the message specified in the "Debugger trace" pane.
Remark: If no message is specified, the name of the current process is displayed in the "Debugger trace" pane. Remark: If the two actions are unchecked, the breakpoint is automatically disabled. - Validez. The icon found before the breakpoint indicates that it includes specific properties.
Breakpoint: Perform Profiling analysis In some cases, when debugging, it is necessary to run the Performance profiler on a Section of code.. This allows you to immediately obtain details of all actions carried out and the Receiver processes, with their durations.. To implement this functionality, 2 stop points must be created: the stop point for launching the Performance profiler and the stop point for stopping it. At runtime: - The Performance profiler is launched after execution of the row Receiver at breakpoint startup..
- Use the F7 key to continue execution up to the stop point signalling the end of the Performance profiler..
- After execution of the row code stopping the Performance profiler, debugging will stop and the window showing the Performance profiler result will be displayed..
Several methods are available for defining the various stop points: - Method 1:
- Create a breakpoint to start the Performance profiler (paragraph Inserting a breakpoint).
- Display the popup menu from the breakpoint and pull down the "Performance profiler" option and select "Start performance profiler".. The Icon in front of the breakpoint indicates that the breakpoint corresponds to the start of the Performance profiler ().
- Then create a second breakpoint in your code, to stop Profiling (paragraph Inserting a breakpoint)..
- Display the popup menu from the breakpoint and pull down the "Performance profiler" option and select "Stop performance profiler".. The Icon in front of the breakpoint indicates that the breakpoint corresponds to the end of the Performance profiler ().
- Method 2:
- Create a breakpoint to start the Performance profiler (paragraph Inserting a breakpoint).
- Display the breakpoint properties:
- via the code editor: On the "Code" tab, in the "Breakpoints" group, expand "Breakpoint" and select "Breakpoint properties".
- via the context menu of breakpoint: Open the context menu of bar for breakpoint management and select "Breakpoint properties".
- In the window that is displayed, in the "Actions" area, specify the action to perform during the passage by the breakpoint (these actions can be combined):
- Interrupt execution (default value): the breakpoint interrupts the execution ans starts the debugger on the current line of code.
- Performance profiler: Select the option to start Profiling analysis.
- Validez. The Icon in front of the breakpoint indicates that the breakpoint corresponds to the start of the Performance profiler ().
- Then create a second breakpoint in your code in the same way. In this case, select the option to end Profiling analysis. The Icon in front of the breakpoint indicates that the breakpoint corresponds to the end of the Performance profiler ().
Remark: The code analyzed by the Performance profiler must not contain breakpoints.. Handle breakpoints (delete Disabling/Enabling a breakpoint A disabled breakpoint is still present in the code editor, but is not taken into account when debugging the application (it becomes Grayed)..
Several methods can be used to disable the breakpoint for the current line:- On the "Code" tab, in the "Breakpoints" group, expand "Breakpoint" and select "Disable breakpoint".
- Press Ctrl + Shift + B.
- Open the context menu of the breakpoint management bar and select "Disable breakpoint":
Remark: The breakpoint can be re-enabled at any time with "Enable breakpoint".Deleting one or more breakpoints Several methods can be used to delete a breakpoint: - In the code editor, click the breakpoint. The mouse cursor turns into a hand and the sign is displayed.
- On the "Code" tab, in the "Breakpoints" group, expand "Breakpoint" and select:
- "Delete breakpoint" to delete the breakpoint from the current line.
- "Remove all breakpoints" to remove all breakpoints.
- In the debugger, click .
- Open the context menu of bar for breakpoint management:
- select "Delete breakpoint" to delete the breakpoint found on the current line.
- select "Remove all breakpoints" to delete all breakpoints.
List stopping points Several methods can be used to list the breakpoints found in the current project: - From the code editor: on the "Code" tab, in the "Breakpoints" group, expand "Breakpoint" and select "List breakpoints".
- In the debugger, click .
- Open the context menu of bar for breakpoint management and select "List the breakpoints".
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|