Debugging TRPC issues?

Am I the only one having trouble debugging trpc code? I am talking specifically about endpoints. I can't seem to mouse over variables / objects and it's quite difficult to debug. I am running the debugger with these options:
{
"name": "Next.js: debug full stack",
"type": "node-terminal",
"request": "launch",
"command": "npm run dev",
"serverReadyAction": {
"pattern": "started server on .+, url: (https?://.+)",
"uriFormat": "%s",
"action": "debugWithChrome"
},
"skipFiles": [
"${workspaceRoot}/node_modules/**/*.js",
"<node_internals>/**/*.js"
]
}
{
"name": "Next.js: debug full stack",
"type": "node-terminal",
"request": "launch",
"command": "npm run dev",
"serverReadyAction": {
"pattern": "started server on .+, url: (https?://.+)",
"uriFormat": "%s",
"action": "debugWithChrome"
},
"skipFiles": [
"${workspaceRoot}/node_modules/**/*.js",
"<node_internals>/**/*.js"
]
}
In this picture, my mouse is over the _apps return statement, and as you can see, nothing is showing. Also, in the Variables > Local window (object explorer), you can see that _apps is not showing.
6 Replies
Gabriel
GabrielOP2y ago
The _apps only starts showing after I hit F11, going to this next line
Lopen
Lopen2y ago
You question isn't clear Also consider throwing trpcError and not regular throw new error
Gabriel
GabrielOP2y ago
@Lopen32 , code was created by Copilot lmao The problem here, is that I can't seem to be able to mouse over variables/constants to see what they contain
Christian Lind
How are you running the debugger there? can you pass along a session context?
Gabriel
GabrielOP2y ago
Do you mean ctx.session?
Christian Lind
yes exactly
Want results from more Discord servers?
Add your server