Various debugger fixes and enhancements

This fixes a couple of annoyances in the debugger. Thanks to pseudonym for his help with the memory access issues.
Could you do "GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH" here please?