Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Unable to debug under windows #8729

Closed
TimBoonstra opened this issue Oct 16, 2024 · 2 comments
Closed

Unable to debug under windows #8729

TimBoonstra opened this issue Oct 16, 2024 · 2 comments
Labels
area: templates Templates directory

Comments

@TimBoonstra
Copy link

TimBoonstra commented Oct 16, 2024

Describe the Bug

I've been trying to get debugging to work onder windows with Visual Studio Code using the V3 beta with the demo website.

I've installed v3 using:
pnpm dlx [email protected]
SQL Lite as DB with de demo site and seeded trough the admin panel.

Modified the .vscode launch.json to use pnpm dev instead of yarn dev:

"configurations": [
   {
     "command": "pnpm dev",
     "name": "Debug Website",
     "request": "launch",
     "type": "node-terminal"
   }

and set brakepoints on most page.tsx files / functions in src/app/(frontend)/ and sub folders . however i never hit any of the breakpoints :(
I've also tried this on 2 seperate pc's, one with normal npm but running into the same problem.

i've also tried nextjs example json :

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Next.js: debug server-side",
      "type": "node-terminal",
      "request": "launch",
      "command": "pnpm run dev"
    },
    {
      "name": "Next.js: debug client-side",
      "type": "chrome",
      "request": "launch",
      "url": "http://localhost:3000"
    },
    {
      "name": "Next.js: debug full stack",
      "type": "node",
      "request": "launch",
      "program": "${workspaceFolder}/node_modules/.bin/next",
      "runtimeArgs": ["--inspect"],
      "skipFiles": ["<node_internals>/**"],
      "serverReadyAction": {
        "action": "debugWithEdge",
        "killOnServerStop": true,
        "pattern": "- Local:.+(https?://.+)",
        "uriFormat": "%s",
        "webRoot": "${workspaceFolder}"
      }
    }
  ]
}

But no brakepoints are ever hit.

Can the documentation / demo website be updated with debugging settings for windows.

Link to the code that reproduces this issue

https://github.com/payloadcms/payload/releases/tag/v3.0.0-beta.114

Reproduction Steps

see description

Which area(s) are affected? (Select all that apply)

area: templates

Environment Info

Payload: v3.0.0-beta.114
Node.js: 20.10.0
Next.js: 15.0.0-canary.173
Visual Studio Code: 1.94.2

@TimBoonstra TimBoonstra added status: needs-triage Possible bug which hasn't been reproduced yet v3 labels Oct 16, 2024
@github-actions github-actions bot added the area: templates Templates directory label Oct 16, 2024
@javierlinked
Copy link
Contributor

I've been trying to debug for a while now, and could not get it working.

@jmikrut
Copy link
Member

jmikrut commented Oct 22, 2024

Hey all, this is more of a Next.js question at this point than a Payload question because we don't have any specific startup command of our own. It's just next dev.

I would defer to Next.js debugging for more information here, but I will convert this to a discussion so that we can talk about solutions here on the Payload repo as well. If anyone comes across a solution, please share it! We will report back if we do as well.

@payloadcms payloadcms locked and limited conversation to collaborators Oct 22, 2024
@jmikrut jmikrut converted this issue into discussion #8833 Oct 22, 2024
@github-actions github-actions bot removed the status: needs-triage Possible bug which hasn't been reproduced yet label Oct 22, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
area: templates Templates directory
Projects
None yet
Development

No branches or pull requests

3 participants