Inspecting and debugging code : Debugging code

Debugging code
A Debugger window opens whenever an error occurs in running code. You use a debugger to find and fix coding errors.
You can also use a debugger to examine code that functions properly and see what messages are sent when the code runs.