Skip to content

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

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

Activity

  1. added
    inspectorIssues and PRs related to the V8 inspector protocol.
    on Dec 13, 2019
  2. addaleax commented on Dec 13, 2019

    @addaleax
    Member

    I can’t reproduce this using the steps above; can you fill out the bug report template here, including OS information?

    Also, my main suspect in the release would be the V8 update to 7.9.

  3. roblourens commented on Dec 13, 2019

    @roblourens
    Author
    • Version: v13.3.0
    • Platform: Linux robfast 5.0.0-1027-azure docs: added a the #29~18.04.1-Ubuntu SMP Mon Nov 25 21:18:57 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
  4. roblourens commented on Dec 13, 2019

    @roblourens
    Author

    I wasn't immediately sure how to test with the same code in Chrome, but if you think this would be a V8 issue, I can try to repro it there and report upstream.

  5. weswigham commented on Dec 13, 2019

    @weswigham

    I also originally reported this to @roblourens using node 13.2, on Windows 10 (so it does repro on other platforms/versions); and have tested that it does not repro on node 13.1. I, too, have come to the conclusion that it's likely a problem in a v8 upgrade, since pretty much the whole inspector API and debug protocol is just reexposed from v8. It saw some notable change recently to better support wasm debugging.

  6. added
    v8 engineIssues and PRs related to the V8 dependency.
    on Dec 20, 2019
  7. targos commented on Nov 20, 2021

    @targos
    Member

    Fixed in V8 8.0.

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

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