Skip to content

Commit f2bf43b

Browse files
authored
Merge pull request #2209 from MGatner/kint-trace
Add trace()
2 parents 4353f47 + caeb1ac commit f2bf43b

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

system/Common.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,3 +1084,18 @@ function dd(...$vars)
10841084
exit;
10851085
}
10861086
}
1087+
1088+
1089+
//--------------------------------------------------------------------
1090+
1091+
if (! function_exists('trace'))
1092+
{
1093+
/**
1094+
* Provides a backtrace to the current execution point, from Kint.
1095+
*/
1096+
function trace()
1097+
{
1098+
Kint::$aliases[] = 'trace';
1099+
Kint::trace();
1100+
}
1101+
}

user_guide_src/source/testing/debugging.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ This method is identical to ``d()``, except that it also ``dies()`` and no furth
4242

4343
This provides a backtrace to the current execution point, with Kint's own unique spin::
4444

45-
Kint::trace();
45+
trace();
4646

4747
For more information, see `Kint's page <https://kint-php.github.io/kint//>`_.
4848

0 commit comments

Comments
 (0)