It accepts multiple types of inputs—such as strings, arrays, or objects—and writes them to a debug log that you can view in the "nuDebug Results" section of the application's menu.
Each entry in the debug log includes:
- A timestamp
- A description of the context (e.g., procedure name, event, or SQL error)
- Procedure – e.g., "Procedure ABC line 1"
- Event – e.g., "Before Edit of Form nuhome line 5"
- SQL Error – e.g., "SQL Error in nuRunQuery"
- Tracing execution flow
- Inspecting variable contents
- Debugging code
Code: Select all
$a = 'Bob';
nuDebug($a);
Code: Select all
nuDebug::setFlag('Test')->log('Error: Failed to retrieve data..');
Code: Select all
$s = 'Hello world';
$a = [1, 2, 3, 4];
$o = ['name' => 'Bob', 'phone' => '555 123456'];
nuDebug($s, $a, $o);
Video: Using nuBuilder's debugger - nuDebug()
For more information, see:
nuBuilder PHP Documentation