-
Notifications
You must be signed in to change notification settings - Fork 27.3k
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
VS Code cannot bind breakpoints in a Turborepo Next.js project #73258
Comments
I think this is the same thing as #73214 |
@michaelschufi Closing in favor of the other one mentioned above! |
Hmm, I'm not sure. For me at least, the breakpoint in #73214's repo binds fine. Edit: |
This is definitely an issue. I posted a temporary workaround here vercel/turborepo#9579 the problem with this workaround is it breaks every other form of debugging e.g. if you want to debug your package from your tests… so I’m looking for some better guidance, maybe some way to modify the source roots only from the NextJS app with turbo/web pack. |
Link to the code that reproduces this issue
https://github.com/michaelschufi/turbo-debug-nextjs-repro
To Reproduce
Using VS Code, open either
the file
turbo-debug-nextjs-repro.code-workspace
:or the folder
apps/docs/
:Open the file
app/page.tsx
inside the folderapps/docs/
.Set a breakpoint on the same line as the
console.log
.Start the debugger and open the page in a browser.
Current vs. Expected behavior
Observe
-> As can be seen: The debugger kind of adds the relative path to the workspace folder to the path of the file it is debugging - resulting in doubling the path segments.
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #1 SMP Fri Mar 29 23:14:13 UTC 2024 Available memory (MB): 15853 Available CPU cores: 16 Binaries: Node: 22.11.0 npm: 10.9.0 Yarn: N/A pnpm: 9.0.0 Relevant Packages: next: 15.0.3 // Latest available version is detected (15.0.3). eslint-config-next: N/A react: 19.0.0-rc-66855b96-20241106 react-dom: 19.0.0-rc-66855b96-20241106 typescript: 5.5.4 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Developer Experience, Turbopack
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
I think, this might also be related to the Next.js dev error window's path not matching the editor's CWD - instead it also outputs the path from the monorepo-root instead of the CWD where
next dev
was called.Note: I don't know if this is a Next.js, Turborepo, Turbopack, or a VS Code issue - probably a bit of all of them 😅
The text was updated successfully, but these errors were encountered: