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

Debugger grinds to a halt with large unrelated files present #433

Open
4 tasks done
hahanein opened this issue Jul 9, 2024 · 1 comment
Open
4 tasks done

Debugger grinds to a halt with large unrelated files present #433

hahanein opened this issue Jul 9, 2024 · 1 comment
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@hahanein
Copy link

hahanein commented Jul 9, 2024

Describe the bug

When there are many large JavaScript files present in a dist/ directory the debugger will attach, sit there for a long time and terminate unexpectedly.

I am using vitest as a test runner for a web application. I am not using vite. However, dist/ is indeed where all build artifacts are moved to.

Of course, most of the files in that directory were stale and should have been removed (automatically). But, the presence of a dist/ directory in my situation is pure chance. Why is vitest monitoring this directory as "outFiles"?

In any case, it took many hours for me to spot this error.

  • Maybe we could have a more helpful error message?
  • Maybe outFiles should be configurable?

Reproduction

  1. Create a project with vitest installed and a single test module
  2. Create a dist directory and create many large JavaScript files in them
  3. Try to debug the test using the Visual Studio Code extension

Output

[INFO 12:28:14 PM] [DEBUG] Debugging started

Version

0.12.4

Validations

@hahanein hahanein changed the title Debugger grinds to a halt with large files presents Debugger grinds to a halt with large unrelated files present Jul 9, 2024
@sheremet-va
Copy link
Member

Vitest uses the default pwa-node config, and outFiles is everything in the workspace: https://github.com/microsoft/vscode-js-debug/blob/main/OPTIONS.md#outfiles-1

Does it work if you add them to config.debugExclude? (This will also override the default value) I can also expose outFiles - or maybe we should override?

@sheremet-va sheremet-va added p3-minor-bug An edge case that only affects very specific usage (priority) and removed pending triage labels Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

No branches or pull requests

2 participants