Debug phase - how the debug helps me
copy linkTranscription
Being able to control the functionality of an application is the best way to find application logic errors; other development environments offer the classic form of step-by-step debugging with the ability to write messages and variable values ??to the console during execution.
Foundation offers both the classic Step By Step debug mode with the introduction of breakpoints in parts of code, but also a debug mode let's call it "discursive" or "verbose" where all the operations performed are traced and for each instruction additional information is reported such as variable values, db connection strings, executed queries etc: all this debug story can be used in html format in the specific debug card.
I immediately remember one thing: this "discursive" mode slows down the execution of the application and is therefore to be used in a test environment and certainly not when installing the application for use in a production environment.
Now let's touch, recompile the application and check that the Enable Debug option is selected; this is the option that traces the execution.
We wait for the application to start, now open the Location screen, then open the Services screen; we may add a Service; we click on the insert button on the panel toolbar, assign a name Laundry and always with a button on the toolbar we save.
We have performed some operations, if we wanted to re-read the operations carried out from the start of the application we can use the button with the bug icon to open the debug tab (if you have activated the popup blocker, deactivate it).
On the left side all the execution phases from the initialization phase to the saving: by clicking on each phase we find parts of code and information that contributed to the completion of the phase.
For example, there is the opening phase of the Services form, the Data saving phase: analyzing the saving we can find an Open Connection instruction with the database (when the icon has a slight vertical blue line it means that by clicking you will get more information) here we read the Connection string used, the username and the connection password. Below we can see the insertion query that was executed; one click and we read the query statement executed.
The discursive or verbose debug reports all the operations carried out with additional information; if there were variables, the values ??before and after the execution of the instruction would be reported.
Other information is found in the lower part: an execution time for each event that occurred with the relative number of times it was performed; the Debug tab contains numerous information, sometimes very valuable for understanding the behavior of the application, especially when it does not conform to the design carried out.
Foundation offers both the classic Step By Step debug mode with the introduction of breakpoints in parts of code, but also a debug mode let's call it "discursive" or "verbose" where all the operations performed are traced and for each instruction additional information is reported such as variable values, db connection strings, executed queries etc: all this debug story can be used in html format in the specific debug card.
I immediately remember one thing: this "discursive" mode slows down the execution of the application and is therefore to be used in a test environment and certainly not when installing the application for use in a production environment.
Now let's touch, recompile the application and check that the Enable Debug option is selected; this is the option that traces the execution.
We wait for the application to start, now open the Location screen, then open the Services screen; we may add a Service; we click on the insert button on the panel toolbar, assign a name Laundry and always with a button on the toolbar we save.
We have performed some operations, if we wanted to re-read the operations carried out from the start of the application we can use the button with the bug icon to open the debug tab (if you have activated the popup blocker, deactivate it).
On the left side all the execution phases from the initialization phase to the saving: by clicking on each phase we find parts of code and information that contributed to the completion of the phase.
For example, there is the opening phase of the Services form, the Data saving phase: analyzing the saving we can find an Open Connection instruction with the database (when the icon has a slight vertical blue line it means that by clicking you will get more information) here we read the Connection string used, the username and the connection password. Below we can see the insertion query that was executed; one click and we read the query statement executed.
The discursive or verbose debug reports all the operations carried out with additional information; if there were variables, the values ??before and after the execution of the instruction would be reported.
Other information is found in the lower part: an execution time for each event that occurred with the relative number of times it was performed; the Debug tab contains numerous information, sometimes very valuable for understanding the behavior of the application, especially when it does not conform to the design carried out.
Changed on: 17/11/2023 / From version: 20.0.7800