Skip to content

Debugger doesn't pause again after stepping through blackboxed function #30903

@roblourens

Description

@roblourens
  • Version: v13.3.0 (and older versions. Works in 8.x)
  • Platform: macOS

Have a script like

// test.js
debugger;
console.log('hello there');
for (var i = 0; i < 100; i++) {
    console.log('helllo there')
}
  • Run node --inspect-brk test.js
  • Open the developer tools against that process
  • Set the following blackbox pattern: ^(?!file:\/\/\/).*. This should blackbox any script that does not start with file:///, and should blackbox all internal node scripts while allowing user scripts to be debugged
  • "step in" into the console.log statement
  • All scripts called by console.log should be blackboxed and execution should continue to the next line
  • Instead, the script runs to completion

I am not sure whether this is node-specific but I wasn't able to come up with a repro in Chrome. It worked at least in Node 8.

If I set up other scenarios of stepping into node code with this blackbox pattern set, sometimes it works and sometimes I see other wrong behavior - it pauses in internal/per_context/primordials.js even though that script is marked as "This script is blackboxewd in debugger"

Metadata

Metadata

Assignees

No one assigned

    Labels

    inspectorIssues and PRs related to the V8 inspector protocol

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions