Debugging is easy in the code gadget. When you run your program, any errors are logged to the console.
A message appears in the program window and a red icon with the number of errors found displays in the "Console" tab.
Click the "Console" tab to see information about the errors. Clicking an error message opens the related file.
In the file, you see the number of errors and an "x" next to each error. Hover over the error to see the error message for that error.