Programming and coding in general is all about debugging. Making sure everything works the way you expect it to and figuring out why it doesn’t when that’s not the case. If you have little or no experience in troubleshooting your code, here is a quick reference of things you should try:
- Always test your commands as you create them. Don’t wait until you have 50 commands before testing the code. Test them as soon as they become “ready to use”
- Always check the debugger when creating lists, variables etc to be certain the values are present and correct.
- Break down your code to isolate the problem and only deal with the processes associated with that(those) command(s). For example, if a script is unable to navigate to a specific site, isolate the navigation process and the url in a separate tab (or in another instance of UBot) to see if that command is working as expected.
- If your issue occurs with commands in a Loop command, remove the Loop and see if the commands run on their own. There is too much going on in a Loop command to isolate the problem as it is. Likewise, if the commands are running in an In New Browser command, remove them from the In New Browser command and run them in the main browser.
- Use the “Step” feature. Step through your code one command at a time. This will help isolate the problem. (Make sure Show Errors are turned on in the options menu).
- Go through the tutorials and script references to make sure you are using the commands as they were intended to be used.