Wing's debugger reports any exceptions that would be printed when running the code outside of the debugger.
Try this out by continuing execution of the debug process with the Debug toolbar item or Start / Continue item in the Debug menu.
Wing will stop on an incorrect line of code in PrintAsHTML and will report the error in the Exceptions tool:
Notice that this tool highlights the current stack frame and that you can click on frames to navigate the exception backtrace. Whenever you are stopped on an exception, the Debugger Status indicator in the lower left of Wing's main window turns red.
Once you reach an exception in the debugger, you can correct your code, stop the debugger with the red Stop icon in the toolbar, and then start debugging again.