Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix break on undefined function + fix protocol debug log. #418

Merged

Conversation

bajtos
Copy link
Member

@bajtos bajtos commented Aug 11, 2014

  • 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

Miroslav Bajtoš added 2 commits August 11, 2014 14:45
The commit 721404 modified internal debugger implementation to use
Node's debugger `Protocol` to parse data sent by the V8 debugger.
With that change in place, `msg.body` is no longer a string, but
a (JSON) object instead. As a result, `event` and `response` entries
printed `[object Object]` instead of the JSON payload.

This commit fixes the problem by calling `JSON.stringify(msg.body)`.
Fix a bug where `TypeError: undefined is not a function` was ignored
in "break on uncaught exceptions" mode.

This exception is thrown by a V8 builtin function CALL_NON_FUNCTION
defined in an internal script `v8/src/runtime.js`, which is not
tracked by Node Inspector. Before this change, Node Inspector
incorrectly assumed that the script is a code loaded via `eval`.
@3y3
Copy link
Member

3y3 commented Aug 11, 2014

I think - it's a good point, that we don't need to see native sources. My proposition was over complicated in this context.

LGTM

@bajtos bajtos merged commit 90973b4 into node-inspector:master Aug 11, 2014
@bajtos bajtos deleted the fix-break-on-undefined-function branch August 11, 2014 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Pause on uncaught exceptions" not pausing on "undefined is not a function"
2 participants