Debugging Vercel Workflows locally with VS Code breakpoints not binding

I am running a DurableAgent in a Workflow, and the tools are defined as use step in the workflow. I am trying to debug an issue locally and I can repro the issue, but I can’t get the debugger to break into the code—the breakpoints are never bound.

Configuration

The launch.json looks like this:

{
   "name": "MyProject (Next.js)",
   "type": "node",
   "request": "launch",
   "runtimeArgs": [
      "run",
      "dev:debug",
      "-p",
      "3002"
   ],
   "runtimeExecutable": "pnpm",
   "cwd": "${workspaceFolder}/apps/myproject",
   "autoAttachChildProcesses": true,
   "console": "integratedTerminal",
   "skipFiles": [
      "<node_internals>/**"
   ]
}

And a simple package.json script:

"scripts": {
   "dev:debug": "next dev"
}

Question

What is the right way to configure my environment to enable stepping through the code? I have a feeling that the problem is the source code maps but no clue on how to fix this.

Thanks,

_peter