Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

How to debug this plugin when launching extension? #120

Closed
jasonwilliams opened this issue Oct 11, 2020 · 3 comments
Closed

How to debug this plugin when launching extension? #120

jasonwilliams opened this issue Oct 11, 2020 · 3 comments

Comments

@jasonwilliams
Copy link
Contributor

Does anyone know how to debug this plugin?
I'm looking into add the color selector, but it seems its not bundled with the extension and used some other way.

I can run the e2e tests, but i want to run this through the debugger while vscode-styled-components is active.

Part of styled-components/vscode-styled-components#95

@jasonwilliams
Copy link
Contributor Author

@mjbvz
Copy link
Contributor

mjbvz commented Oct 12, 2020

You need to attach to the TypeScript server to debug through the plugin. To do this:

  • Set an environment variable TSS_DEBUG=PORT (for example TSS_DEBUG=9999)
  • Start the typescript server in an environment that has TSS_DEBUG set
  • Then attach to port 9999 from chrome or using VS Code's debugging tools

You can also use TSS_DEBUG_BRK to make the remain paused until you connect to it

@mjbvz mjbvz closed this as completed Oct 12, 2020
@jasonwilliams
Copy link
Contributor Author

in case anyone comes across this, you need to use TSS_REMOTE_DEBUG=PORT if debugging via WSL

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants