By using RPG Fast Debugger
, you can expedite the process of troubleshooting PHP code and resolving issues.
First install Fast Debugger
desktop application according to your operating system.
Now you are ready to receive log data from PHP
projects.
composer require manadinho/rpg-fast-debugger --dev
To use RPG Fast Debugger
in your RPG-PHP
project. Just go to your library/global_functions.php
and place following method there. This method takes three arguments.
First argument is supposed to be array, in this array you can pass as many variables you want to inspect.
Second argument is optional. You can pass any flag (string) to it to make it easy to find your log on Fast Debugger desktop app.
Third argument is optional. If application is not running in docker you can pass the host to it. Which will be localhost
in that case.
function ezFast(Array $data, $flag="", $host="host.docker.internal") {
if ( RPG_LOCAL ) {
return new Manadinho\RPGFastDebugger\RPGFast($host, $flag, $host);
}
}
Now simply use ezFast method to debug the app.
ezFast([$var1, $var2], $flag, $host);
On log data you can see file name and line number from the ezFast()
method is called. You can open file in VSCODE
by simply clicking on file name.