Tuto WINDEV 25

386 Part 6: Optimizing and debuging a project 2. When the cursor shaped like an arrow reaches the "PROGBAR_Progress..MaxValue = ..." line, hover "PROGBAR_Progress" with the mouse. A tooltip is displayed with the expression value: 3.  The value of "PROGBAR_Progress..MaxValue" is displayed in a tooltip. This value corresponds to 100 because the code line was not run. 4. Press F8 to run the line. 5. Hover "PROGBAR_Progress..MaxValue" again. The value of "PROGBAR_Progress..MaxValue" displayed in the tooltip corresponds to the result of HNbRec(Product). ▶ Let’s continue our operations in the debugger. We are now going to run the UpdateProductStock procedure step by step in the debugger. 1.  To run this procedure step by step, press the F7 key (or click the "Detailed step by step" button in the ribbon). 2.  The procedure code is displayed in the debugger. ▶ We are now going to add an expression to monitor the evolution of its value in the "Debugger" pane. 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. 1. Press F7 to run the different lines of UpdateProductStock procedure until you reach the line: PROGBAR_Progress++ 2. Hover "PROGBAR_Progress". The value displayed in the tooltip is 0. 3. Select "PROGBAR_Progress" in the code editor and open the popup menu (right click). Select "Add the expression to the debugger".

RkJQdWJsaXNoZXIy NDQ0OA==