Skip to content

Very slow debug stepping in large file after Node 13.2 #30926

@roblourens

Description

@roblourens

We noticed that debugging tests in the TypeScript repo has become extremely slow after v13.2. The file we are stepping through is extremely large, which is probably part of it. Here are steps to reproduce:

  • Clone and build https://github.com/microsoft/TypeScript
  • Run node --inspect-brk node_modules/mocha/bin/_mocha -u bdd --no-timeouts --colors built/local/run.js -f tests/cases/compiler --skip-percent 0
  • Attach with devtools
  • Hit a breakpoint anywhere in parser.ts
  • Step
  • Notice that every step takes several seconds to pause on the next line
  • Using any version of node before 13.2, stepping is very fast

For slightly easier setup, you can debug in VS Code with the "Mocha Tests" launch config

Metadata

Metadata

Assignees

No one assigned

    Labels

    inspectorIssues and PRs related to the V8 inspector protocolv8 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