4D v14Video script |
||
|
4D v14
Video script
Video script
In this video, we're going to learn how to display and work with the debugger. You use the debugger to trace and check whether our programming meets functional expectations. It lets you check:
We're going to reuse the form with the variables to explore the debugger. We'll add a break point (we'll come back to this later) and display the form. When we use buttons that are not within the trace mode, execution takes place normally. If we click on a button that is within the trace mode, the debugger appears. We can define 5 areas in the Explorer: 1°) The source code pane: this shows the method being executed. Here we can:
2°) The 2nd area concerning navigation buttons, and we'll cover it more thoroughly later on. A help tip explains what each button does. 3°) The Custom watch pane area here 4°) The watch pane contains all the expressions available in 4D (tables, field, constants, variables, processes, and so on) 5°) The call chain pane represents the chain of methods that let us get to the program displayed. We're going to stop the method execution. There are 5 ways to display the debugger deliberately: 2°) By placing a break point: that's what we did on this button here. 3°) While using the program (during execution), you can use the following shortcuts:
The list of processes appears. 4°) In the Design environment, when you execute a method, you can click on the execution button and choose "Run and Debug", within the application process or in a new process. In this case, the trace mode appears automatically so that we can debug the method. 5°) And finally, one last way to show an equivalent to the trace mode is to use the Runtime Explorer by pressing "Ctrl+Shift+F9". The Runtime Explorer (which is only available to developers and other authorized users) lets you display the list of processes, for instance the main process, and then trace it. So there are 5 ways in all to display the trace mode. The most frequent of these are:
The debugger also appears, usually unintentionally, when 4D cannot run your code (such as with syntax errors, typing errors, and so on). It displays a message so that you can switch to tracing. Let's take an example in the navigation method: if we remove the = here and save, 4D displays an error and offers to trace the code in order to show us the problem. |
PROPERTIES
Product: 4D ARTICLE USAGE
Self-training ( 4D v13) |