Skip to main content
Question

How to debug Figma plugins with VS Code debugger

  • January 8, 2023
  • 6 replies
  • 1452 views

Saulo_Vallory

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.

DEV Community

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!

6 replies

  • 1 reply
  • March 8, 2023

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


Saulo_Vallory
  • Author
  • Active Member
  • 26 replies
  • May 30, 2023

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


Vincent_Huss
  • Active Member
  • 29 replies
  • January 19, 2024

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.


neha3
  • 7 replies
  • January 19, 2024

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.


Vincent_Huss
  • Active Member
  • 29 replies
  • January 19, 2024

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


neha3
  • 7 replies
  • January 29, 2024

wow it sounds great you got you solution.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings