Trality's Code Editor includes a powerful debugger, which allows you to be in total control and to see the output of your source at any line of code. With this feature, you can easily identify and fix any undesired behavior of your bot:
To get started, set breakpoints by clicking on the side of the line number in the editor. When a red dot appears, you have set a breakpoint. When run in debug mode, the code execution will stop at each breakpoint and give you an output of all variables as well as your balance.
Selecting Debugger next to the Terminal output will show you a list of selected breakpoints as well as the line of code at which they are. To run your code in Debug Mode, simply click the small bug icon on the bottom right of the Debugger window.
The code execution will stop execution at the line of the first breakpoint. Inside Variables, you will see all variables that have been set until this point. Under Balances, you will see your bot's balance until this point.
In order to continue to the next breakpoint, click on the Play button on the bottom right. In order to stop the Debug Mode, click on the Stop button on the bottom right.