Tuto WEBDEV 25
Part 10: Optimizing and debugging a project 371 ▶ First of all, we are going to run the different statements step by step and see the content of variables: 1. Press F7 (or click “Step by step”). The current line is automatically run by going into the sub- procedures if necessary. Remark: To avoid going into the sub-procedures, press the F8 key or click the "Step by Step" button. The values of variables are modified (if necessary) in the "Debugger" pane (displayed at the bottom of the screen). 2. Keep pressing F7 until you reach "Product.Stock = InterrogateSupplierDatabase ...", hover "Product.Stock" with the cursor. A tooltip is displayed with the expression value: 3. The value of "Product.Stock" is displayed in a tooltip. This value corresponds to 20 because the code line was not run. 4. Press F8 to run the line. 5. Hover "Product.Stock" again. The value of "Product.Stock" displayed in the tooltip corresponds to the result of InterrogateSupplierDatabase procedure. ▶ 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 result of the expression 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. Select "Product.Stock" in the code and display the popup menu (right mouse click). Select "Add expression to debugger".
Made with FlippingBook
RkJQdWJsaXNoZXIy NDQ0OA==