Still can't get breakpoint debugging working in wrangler 3.9.1

Seems like a lot of work went in getting breakpoint debugging working in the last couple of releases (Thanks! I know this is hard and tedious, but Cloudflare Pages is a hard sell if debugging doesn't work ๐Ÿ˜ฆ ), but I still can't get it working. Neither in the cloudflare hosted devtool, or in VSCode. The issue can be reproed with with the Remix cloudflare pages template and a simple action. For the devtool I documented what I found there (probably not the best place since I posted after the issue was closed, my bad): https://github.com/cloudflare/workerd/issues/371#issuecomment-1732638607 Basically, sourcemap worked for the bundler in wrangler (so it "maps" to one hop, which is the output of the Remix build), but doesn't map further, seemingly because it couldn't find the next sourcemap in the chain. If you take the sourcemap output from my bundling process, and add it to the deployed file, the devtool will show the files correctly and let you set breakpoints (everything being a few lines off because that's technically the wrong sourcemap). That issue can be reproduced in any sourcemap environment, including some visualizers, like https://evanw.github.io/source-map-visualization/ Then for VSCode, it seems similar. It cannot find the previous sourcemaps in the chain. With a launch configuration such as:
json
{
"name": "Wrangler",
"type": "node",
"request": "attach",
"port": 9229,
"cwd": "/",
"resolveSourceMapLocations": null,
"attachExistingChildren": false,
"autoAttachChildProcesses": false
}
json
{
"name": "Wrangler",
"type": "node",
"request": "attach",
"port": 9229,
"cwd": "/",
"resolveSourceMapLocations": null,
"attachExistingChildren": false,
"autoAttachChildProcesses": false
}
I get an error in the debug console: file:///home/<my user>/dev/my-project/functions/%5B%5Bpath%5D%5D.js: ENOENT: no such file or directory, open '/build/[[path]].js.map' /build/[[path]].js.map is set by Remix I think, so there might be an issue in how the files are setup to make Wrangler happy, but it's really hard to figure out what each and every tool expects, so I haven't been able to diagnose it very well.
GitHub
๐Ÿš€ Feature Request: Breakpoint debugging support in workerd ยท Issu...
Hi, Basically, I don't know how to debug a worker with VS Code. When clicking "Run/Debug" in VS Code, it basically invokes what is configured in .vscode/launch.json. I just have no id...
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server