Skip to content

stepping over a function containing a throw does not work #7219

Description

@weinand
  • Version: 6.0.0-6.2.1
  • Platform: all
  • Subsystem: debugging

Save this snippet as throw.js:

function throwAndCatch() {
    try {
        throw new Object();
    }
    catch (e) {
    }
}

console.log("before");
throwAndCatch();
console.log("after");
console.log("the end");

Debug snippet with node builtin debugger:

node debug throw.js
  • step over console.log("before");
  • step over throwAndCatch();

Observe: the first step works fine but the second doesn't. The program runs to the end.

Commenting out the line with the throw makes stepping work.

The same problem can be observed when debugging in node-inspector or VS Code.

In node versions < 6.0 stepping was working fine.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    v8 engineIssues and PRs related to the V8 dependency.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions