Cant debug worker in Webstorm
Hey, I used wrangler to create a Cloudflare worker project. Its stored on wsl. I am using WebStorm (installed on Windows) to develop in it. When setting break points and launching the dev profile in debug mode, the breakpoint doesnt trigger. this ist also true for tests Im writing (with vitest). How can I get debbuging functionality in Webstorm and why does it not work in the first place?
Im sorry if this is not a cloudflare specific issue, but I sadly could not get it to work so I would be grateful for help. Thanks a lot.
Things I tried:
I updated my tsconfig to this:
Launch options for Vitest are:
Im not sure what other information I can provide, so just ask :)
7 Replies
Take a look at this article: https://blog.cloudflare.com/debugging-cloudflare-workers/
The Cloudflare Blog
Better debugging for Cloudflare Workers, now with breakpoints
We provide many tools to help you debug Cloudflare Workers; from your local environment all the way into production. In this post, we highlight some of the tools we currently offer, and do a deep dive into one specific area - breakpoint debugging - a tool we recently added into our workerd runtime.
One of the examples given is Webstorm
thank you very much, I will give it a look and will be back if that doesnt help


@Razboy20 thanks a lot. this helped and I could get it to work. I even managed to use a compund so that I dont have to manually start the server all the time :)
--inspect is essential here and what I was missing beforehand.
Thanks, this makes developing so much nicerGreat! Glad I could help point you in the right direction.