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

the coverage in vite.config.ts causes unbound breakpoints when debugging internal packages #7757

Open
Newbie012 opened this issue Jul 18, 2024 · 1 comment
Labels

Comments

@Newbie012
Copy link
Collaborator

Describe the bug

When trying to debug eslint-plugin-query using breakpoints, the code breaks on the wrong breakpoints. This is probably due to the changes made moving from tsup to vite. More specifically, this line:

coverage: { enabled: true, provider: 'istanbul', include: ['src/**/*'] },

When commented, the breakpoints are working as expected. I assume it happens because of how istanbul tracks the code coverage.

Your minimal, reproducible example

n/a (bug in the repo itself)

Steps to reproduce

  1. clone the repo
  2. pnpm i
  3. set a breakpoint in one of the lines of the packages eslint-plugin-query
  4. pnpm test:lib:dev
  5. see that the code stopped on a different line

Expected behavior

I expected the code to stop on the breakpoints I set ahead of time regardless of the coverage settings.

How often does this bug happen?

Every time

Screenshots or Videos

image
image

Platform

  • macOS, Windows
  • VS Code

Tanstack Query adapter

None

TanStack Query version

5.51.9 (irrelevant)

TypeScript version

5.3.3 (irrelevant)

Additional context

I haven't tested this behavior on other packages.

@TkDodo
Copy link
Collaborator

TkDodo commented Jul 26, 2024

I've seen the same lately when debugging tests. @lachlancollins can we turn coverage off in general and only turn it on when we run tests in CI ?

@TkDodo TkDodo added the tests label Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants