Unofficial Content

GeneXus object with remote DebuGX take the following steps:

1. Specify the object (without Generating).
2. Execute the DebuGX Specifier, indicate the IP address of the "remote PC" and process the object.
3. Generate the object.
4. Send both the object's new version and the RemoteDebugx.exe file to the "remote PC".
5. Execute RemoteDebuGX.exe on the "remote PC".
6. Execute the object on the "remote PC" and save the execution.
7. Open the DebuGX Console and the remote execution.

IMPORTANT: when debugging an object, the generated source code has an inferior execution performance. To avoid this, specify and generate the object again with GeneXus, without the DebuGX Specifier, and send it to the "remote PC".

 
 

 

DebuGX Console


DebuGX Console is executed from the menu "Tools" in GeneXus "DebuGX Console" option.

As shown in the picture, the Console is divided into several sections:
- Main Menu: It unfolds the available options.
- Toolbar: The toolbar is below the Main Menu and it is has the following buttons (from left to right): Open, Save, Delete all the captured steps, Refresh the workspace, Step back, Step forward, Pause, Execute until the following breakpoint, Searcher, Delete all the breakpoints, Enable or disable all the breakpoints.
- Objects browser: It shows all the objects specified by the DebuGX Specifier.
- Properties: It shows the attribute/variable properties selected in the Objects browser.
- Source code browser: It shows the selected object GeneXus code.
- Watch list: It shows the selected attributes / variable values in execution.
- Alerts: It shows the defined alerts.
- Steps: It Shows the number of executed code lines with the possibility of moving backward or forward.

Breakpoints and Alerts


Breakpoint


A breakpoint is a stopping point in the execution.
To insert a breakpoint, either double click on code line in "Source code browser", or right-click on the line, and select the "Insert Breakpoint" option.



In case the line has already a breakpoint, the effect is to delete that line´s Breakpoint.
All breakpoints may be disabled/enabled or clear through the button in the "Toolbar" or with the "Debug" menu option.



Alerts

Are another kind of stop in the execution. These are conditional stops, that is, breakpoints depending on a condition fulfillment for the execution stops.
In the "Alerts" section it needs to be typed a logic condition. When that condition is correct, it would be indicated by an icon on the left.



If the execution stops because of an alert, the same icon will indicate that the running alert.



To disable an alert comment the line with "//"



Note: The attribute or variable names in an alert must be placed before with the object´s name. The object´s name must be written with the letter assigned by GeneXus (i.e: R: Report, W: Work Panel, etc.).
 

DebuGX in a Report / Procedure



When the object to debug obtains the execution, the code line to be executed may be seen in the "Object Browser". Besides lines appear on the left lower margin indicating that the application is in execution. From that moment, DebuGX controls the execution.



In case the "Automatic Pause when start" option is selected in the "Options" menu, the execution will pause in the first code line. Otherwise, the execution will continue until the first Breakpoint.



The existing execution controls are the following:



- Step Forward: This option/button allows to move forward one line in the execution.
- Step Back: This option/button allows to move backward one line in the execution.
- Run until the next Breakpoint: This option/button allows to move the execution forward until the next Breakpoint.
- Pause Execution: This option/button allows to pause the execution in the line ongoing.


- The "Steps" Bar allows to move, back and forth, through the executed code lines.




Place the mouse over any attribute or variable, and all the attributes and variables values in that code line will appear.



To monitor any attribute and / or variable include them on the "Watch List". There are two ways:


1. On GeneXus code, right-click on the attribute or variable line. Then, choose the "Add To Watch List" option and select the attribute/ variable from the list.



2. Look for the attribute/variable in the "Objects Browser" and double click on its name.



If the attribute/variable belongs to a Structured Data Type (SDT) or a Business Component (BC), it will appear on a new window:



Every time you update a value or add an item to the collection, this window will refresh, that is, the tree expands and shows the SDT or BC content. To activate or deactivate that function, click on the option "Auto Expand SDT tree" from the "Option" menu.



Selecting an attribute/variable in the "Objects Browser", the "Properties" window will show the defined properties for that attribute/variable.



Char, numeric and date variable values can be changed in execution from the DebuGX console. Right-click on GeneXus source in the variable line and go to the "Change Values" option then select the variable from the list.



Once you select the variable, the following window will appear:



You could see the modified value once it has been determined.



Note: Remember the indicator () shows the GeneXus source line to be executed so for the code to execute, the indicator must move to the following line first.
 

DebuGX in a Work Panel / Web Panel


The main characteristic of the events objects is the possibility to go directly to its definition or to some subroutine. For that, right-click on mouse over the "Source code Browser" and go to the "Goto Event/Sub" option.



When a Work Panel / Web Panel with the Base table doesn´t have defined the "Load" event, DebuGX defines one called "Implicit Load Event". This allows visualizing the values of the attributes obtained from the Table. (If there is a subfile, this event will be executed for every loaded line)



The "Options \ Automatic Pause when start" menu option (Shown in DebuGX in Report / Procedure)
in Work Panel / Web Panel will only work if the "Start" event is defined, otherwise, enter a breakpoint in the desired place.
 

DebuGX in a Transaction ( Debugging Rules ! )


In the transactions, the execution rules may be seen.



- All rules with explicit condition have two execution moments:
1. Before the condition evaluation. On the DebuGX console, this moment is showed with the execution indicator () in the corresponding rule line and with an indicator in the condition that will be evaluated.



2. Before the rule triggers (this moment will only exist if the condition evaluation was genuine). In this moment, the DebuGX´s Console preserves the execution indicator in the corresponding rule line and shows an indicator in the rule that will be triggered.



- In the rules without explicit condition, the execution indicator () will be seen in the corresponding rule line and an indicator is shown in the rule that will be shot.


In this way, you are able to see every rule moment and obtain the attributes and / or variables values before each one.


If the "Always Pause on Rules" option is selected in the "Options" menu the execution will pause in each rule before being evaluated and / or before being shot, depending on the case. If not, the execution will continue until the first breakpoint.



In the "Rules" section there may be differences with the ones defined in GeneXus. This happens because of the following:

Particular Rules:

There are rules that are turned into equivalents by the specification.

Examples:
1. The rule "Serial(att1 , att2 , step);" will be turned into the following rules:

att2 = old(att2 ) step IF insert AND level( att1 );
att1 = att2 IF insert;


2. The rule "Default(att | &var , expression);" will be transformed into:


att | &var = expression IF insert AND null( att | &var ) AND &GxBScreen = 0;

Formula attributes

Some formulas are solved through rules.
Example:
1. The InvoiceTotal attribute (an Invoice total) defined as a formula: SUM (InvoiceLinetotal) (vertical Sum) is solved by the following rules:


InvoiceTotal = old(InvoiceTotal) InvoiceLineTotal IF insert;
InvoiceTotal = old(InvoiceTotal) InvoiceLineTotal - old(InvoiceLineTotal) IF update;
InvoiceTotal = old(InvoiceTotal) - old(InvoiceLineTotal) IF delete;

Attributes with a value range

The attribute validity ranks are solved by rules.
Example:
1. The InvoiceLineQty attribute (item amount) defined with the following rank: 1:20; is solved by the following rule:


Error( 'Field Quantity is out of range' ) IF NOT ( ( InvoiceLineQty >= 1 AND InvoiceLineQty <= 20]]



The GeneXus Specifier makes these transformations and they are seen in the detailed navigation.

Last update: April 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant