An important problem of a programmer's productivity is finding his way through the code. A good project structure and your IDE can get you a long way, but sometimes it’s not enough. Luckily enough Ray has a bunch of tools to help you out.
Imagine an example where you have a NotifyUserAction being called, but you are unsure exactly why or where this call happens. Your IDE tells you the action is being used in 10 different files, and you don’t want to walk through all the code paths.
An easy way to figure this out is to add a call to Ray with the “trace” method.
public function execute(): void
// Some logic to notify the user...
Now the only thing you have to do is use the application and look at Ray. Once your application hits the trace method, a nice backtrace will be shown in Ray.
The entries in the trace that belong to your application are highlighted in blue, making it easier to visually distinguish them from the code originating from the framework and packages.
If you are unsure what exact user action is triggering this part of your code and you want to click around your app until it shows, you can always chain in the showApp() method, which will bring Ray to the foreground once that part of the code is being hit.
The trace method is only one of many powerfull tools Ray provides. Make sure to take a look at the documentation if you want to learn more.