How to debug Figma plugins with VS Code debugger

Hey guys! I just wrote an article on dev.to with a tutorial on how to debug Figma plugins in vs code instead of dev tools.

It’s my first one and would like to kindly ask you to tell me honestly what you think about it, especially what I could improve.

I intend to do more, sharing whatever I learn while building my first plugin, so I would appreciate any comments that help make the following ones better.

Thanks!

1 Like

Hey there I have been unable to follow your guide, it says cannot connect to debugger on port 9222. Could you help?

Hey! Sorry I never got back to you. Life has been crazy over here. I can definitely help! maybe ping me on twitter (https://twitter.com/svallory_en) so we can chat. I’m gonna need to know exactly what you are doing and ask you to run some commands

Hi ! Thanks for this,

I’m also having some issues,
i’m on windows, and i got the message “cannot connect to the target localhost:9222 […]”

I tried both the “Run Figma then Attach” (closing Figma with an opened tab before)
and “Attach to Figma” (when Figma is already launched)
but I get the same message in both case.

Do you have any idea ?
Thanks in advance.

Hey here is some steps please follow this it can help.
Check that Figma is running and accessible also double check that there are no firewall or network issues blocking the connection and then confirm that the port 9222 is not being used by another process. After that try restarting both Figma and the application trying to connect.

1 Like

Oh !
it worked, i combined all your suggestions, still didn’t work,
but then i tried to check in the processes if the Figma process was carrying the remote-debugging-port argument, and i noticed that there was 10 Figma processes,
i killed them all and restarted the process, which worked !

Thanks

1 Like

wow it sounds great you got you solution.