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

Tanstack start VSCode debugging #3124

Open
SpeedOfSpin opened this issue Jan 8, 2025 · 5 comments
Open

Tanstack start VSCode debugging #3124

SpeedOfSpin opened this issue Jan 8, 2025 · 5 comments

Comments

@SpeedOfSpin
Copy link

SpeedOfSpin commented Jan 8, 2025

Which project does this relate to?

Start

Describe the bug

Hi All
I really like Tanstack Start but at the moment I don't see a path to migrating to is because the debugging just doesnt work. If I have a root component called index.tsx, I can hit a breakpoint within a server function for the first time but then subsequent breakpoints don't work. Also, when I hit a breakpoint I don't see the value of the variables, it just shows their type. Then when I continue it goes into another file called index.tsx?tsr-split which looks like transpiled code.Is this possibly because of Vinxi? Is this a known problem and do you think it will be resolved.

Thanks for all the hard work

Your Example Website or App

https://github.com/SpeedOfSpin/startdemo

Steps to Reproduce the Bug or Issue

open in vscode
run the vscode Debug server side from debug tab
run the vscode Debug client side from debug tab
put a breakpoint in index.tsx at line 24
refresh the page
hover over the count variable and it will just show "const count: number"
press F5
you will be taken into a file called index?tsr-split
If you click the button in the web page it should break on the breakpoint again but doesnt.

Expected behavior

I expect to see the actual count value and also be able to hit the breakpoint each time

Screenshots or Videos

Image

Platform

  • OS: Windows 11
  • Browser: Chrome
  • Version: 131

Additional context

Tested debugging server actions in Nextjs 15 and get no issues.

@alexwork1611
Copy link

Hey dude,

Thanks for documenting the issue. I can confirm that I've run into the same problem just now.
We probably have to wait one more year until this thing is stable and production-ready.
That being said, I will start my new project using plain Nitro (w/ tRPC) for the backend and React for the frontend in the classic monorepo way.

Have a good one!

@ochowie
Copy link

ochowie commented Jan 10, 2025

Want to add a +1 to this. I can't seem to debug the application in WebStorm at all. The debugger will stop in a random part of the file and will never hit the breakpoint I have set in the loader. This is not an issue for either Next or Remix.

@ochowie
Copy link

ochowie commented Jan 10, 2025

EDIT: I am experiencing the same thing as the issue reporter.

@schiller-manuel
Copy link
Contributor

@ochowie probably source maps

how did you configure VScode so this works for you?

@ochowie
Copy link

ochowie commented Jan 11, 2025

I take it back. I tried using the sample project from the original issue and it doesn't stop after the initial load and won't give variable value information.

In fact, it seems like the debugger doesn't recognize that it is in the function scope at all as trying to reference the variable in the debug console throws an error. I will edit my previous posts as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants