# Preparations
# in IDE:
# open the `modules/custom/units/widgets/widget_eh.php` file for editing
# in the `\WidgetEventHandler::SetCustomQuery` method after calling the parent method add `$b = $a + 1;`
# save changes
# Part 1 (install/upgrade)
NOTE: Repeat this test also for an upgrade.
# perform a clean install
# login to the Admin Console
# go to the {nav Configuration > Website > Adanced} section
# confirm, that the `Record code fragments in "System Log" for these paths (regexp)` system setting is present and has `#(modules/custom|system/cache/modules/custom)/.*#` value
# Part 2 (code fragment logging, filtering, display)
NOTE: Repeat this test with different (see below) system setting values.
# login to the Admin Console
# go to the {nav Configuration > Website > Adanced} section
# set the `Record code fragments in "System Log" for these paths (regexp)` system setting to (choose value based on test iteration):
* `#(modules/custom|system/cache/modules/custom)/.*#`
* `#(core|system/cache/core)/.*#`
* ` ` (empty string)
# save changes
# go to the {nav Custom > Widgets} section
# confirm, that an `Undefined variable: a` notice appears in Debugger
# go to the {nav Logs & Reports > System Log} section
# confirm, that record for the `Undefined variable: a` notice was created
# open the record for the `Undefined variable: a` notice for viewing/editing
# confirm, that the backtrace looks visually the same as in other system log records
# click on the ALL `Function:` links of the backtrace records
# confirm, that:
* the `Arguments:` text is shown above function/method arguments
* the `Toggle Code...` link is shown below function/method arguments in the lines related to:
* the Custom module files (e.g. PHP files from "modules/custom/units" or TPL file from the "modules/custom/admin_templates", that were compiled into PHP files), when the system setting was `#(modules/custom|system/cache/modules/custom)/.*#`
* the Core module files (e.g. PHP files from "core/*" or TPL file from the "core/admin_templates", that were compiled into PHP files), when the system setting was `#(core|system/cache/core)/.*#`
* the Core and Custom module files, when the system setting was ` ` (empty string)
# click on the `Toggle Code...` link once
# confirm, that:
* a highlighted code fragment appears
* each line in the code fragment has a line number, that corresponds to the line number in the associated file
* line number associated with the trace is marked with the `>>> ` sign