Debugger Variations
Overview
Use the Debugger tab to debug advanced functions. Test code in the Debugger by providing different values for the attributes/parameters as inputs. The Debugger varies quite a bit depending on where you are in the application.
Administration
Configuration Debugger
Begin in the Input section, located in the upper left-hand corner for the Function Editor.
You should have already added your attributes/parameters under the Attributes tab. What you have added will appear in the first column under Action Inputs.
- Select the corresponding cell in the Values column and choose a value for the attribute, either by using the drop-down or by typing a value into a cell.
- Click Run to run the function. The result appears in the Console section.
- Click Clear to remove the Values for your attribute(s) and clear the Console.
- Click Expand Console to hide the Input section of the Debugger and expand the Console section.
If there is an error in the syntax, an error message will appear above the tabs.
Commerce Debugger
This Debugger requires users to select at least one variable and then use a Transaction ID number to import the Values for each attribute you selected. You could also manually enter these values. For more information, see the topic Finding the Transaction ID.
Commerce Library
There are a number of sub-headings that can be used under the Commerce Library Debugger tab. For more information, see the topic Library Functions.
Test Script: Provides a way to test a BML Library function when array type attributes are input parameters. Within the Test Script, you can populate your own complex data objects and pass it to the library functions to analyze the results. Test Scripts can also be used to compute multiple iterations of the library functions and print each.
Example of Test Script:
- Create values for the parameters used in this function.
-
View the return statement, it is written as follows: return.util.function_name(parameters)
.
Param |
If you defined parameters in the header section, they appear here for Debugging. |
System |
Lists the attributes added under the System Attributes section. They appear here so the parameter values can be populated/changed when debugging. Populate values by double-clicking the Value section next to the desired attribute(s). |
Header |
Lists the attributes added under the Main Document Attributes section. You can add values by double-clicking the Value section next to the attribute(s) of your choice. |
Line Item |
Lists the attributes added under the Sub-Document Attributes section. You can populate values for debugging by double-clicking the Value section next to the desired attribute(s). |
Common |
In the Common Attribute section, click Add to access the common attributes that are available across the system.
Example: Suppose the function requires you to check the user type of the logged-in user. Choose the user type Common Attribute and reference it in your function.
|
Notes
Integration details can be retrieved using BMQL, including usernames and passwords. Making requests using the Integration Password will fail in the BML debugger, since their values are masked to prevent exposure.
Related Topics
See Also