Fix break on undefined function + fix protocol debug log.

- Fix a bug where `TypeError: undefined is not a function` was ignored
in "break on uncaught exceptions" mode.
- debugger: fix protocol debug log

Close #344.

@3y3 please review