Last updated: 27-08-2020
After creating an action, endpoint, or basically everything in your application, you want to try it out. If you did everything right, it should deliver the expected results. Happy days.
It's also possible the application doesn't do exactly what you expected it to do. There can be multiple reasons:
As a builder, you need to know what went wrong, where it happened, and most importantly: why?
Using debugging tools will pinpoint exactly where the issue resides and gives you tips on how to fix is.
Our debugging tools can be found in all parts of the platform where users can initiate a process, and the platform needs to execute certain steps. This can be divided in 2 main sections:
On every action, page or endpoint, you'll find the option to turn on debugging and start working on a solution. The results of debugging can be found in the Logs, found under Tools.
Time to get things done. With some background knowledge on the debugger, we're going to turn it on.
Pick an action of your choice, ideally one that's throwing errors.
Pick a page of your choice, ideally one that's throwing errors.
Luckily, the platform always provides some insight on your actions when things go awry. Even when debugging is turned off.
If debugging it turned `off`, and an action is completed successfully, the logs won't contain any information. If the action does not complete successfully, or an error occurs, a log entry will be available for that process. This contains the timestamp of when started, the failed process, used variables and the error message.
This option is only available for Actions. With this setting, only the initiation of the action is logged, providing log entries containing the timestamp and the action itself.
This is the most detailed version of debugging.
Available for Actions, Pages, and Endpoints, this provides a start to end insight of the process.
The entries in your application Logs will contain the following information about the process:
More information about what can be found in the Logs can be found here: Logs Reference.
Using debugging tools are crucial when developing. However, don't go overboard on it. There are some consequences to using the debugger.
You'll see exactly what's happening and where. Each step is tracked, analyzed and saved for you to look in to.
Saving each step as a log entry requires performance of your application. Performance that could otherwise be assigned to executing the action. This results in actions and pages being slower and taking longer to complete when debugging is turned on, than when debugging is turned off.
Debugging is awesome, but use it wisely. Only use extended debugging during development and when you're encountering errors that need further attention.
When you're done debugging and the process is working as expected: Turn debugging off!
Having a hard time debugging? Not sure how to read the logs? Take a look at this article: What are logs and how to read them?