platformio-vscode-ide
platformio-vscode-ide copied to clipboard
Does not work in Github Codespaces
Problem
When opening PlatformIO Home:
VSCode extension appears to load from 127.0.0.1
instead of the GitHub Codespaces URL.
Solution
Check for CODESPACES=true
and CODESPACE_NAME
environment variables.
Applicable Code
I think this comes from:
-
iframe src
: https://github.com/platformio/platformio-vscode-ide/blob/69bfc19bae633213c6d5455b47cb22efb2dcfed4/src/home.js#L158-L162 -
getFrontendUrl
: https://github.com/platformio/platformio-node-helpers/blob/b2a974c350bd5cfa2b680df5fdd762dbeef9df07/src/home.js#L46-L58 -
constructServerUrl
: https://github.com/platformio/platformio-node-helpers/blob/b2a974c350bd5cfa2b680df5fdd762dbeef9df07/src/home.js#L33-L43 -
_HTTP_HOST
: https://github.com/platformio/platformio-node-helpers/blob/b2a974c350bd5cfa2b680df5fdd762dbeef9df07/src/home.js#L29
let _HTTP_HOST = '127.0.0.1';
I'll try to fork and contribute when I can. Any advice would be greatly appreciated!
You can change this value in settings. See screenshot below

This issue has been automatically marked as stale because it has not had recent activity. Please provide more details or it will be closed if no further activity occurs. Thank you for your contributions.
Any updates or plans for this?
Hi @ivankravets
The #4431 may be slightly different from this, but may be hopefully resolved by the resolution for this issue.
For the clarification, what I did was
- installed the code-server on RPi
- Downloaded the PIO from marketplace and uploaded to RPi
- Accessed the code-server with Safari
- Installed the PIO manually with the VSIX file
- Restarted the code-server
And as I stated, I can use the PIO/code-server to develop for esp8266 Arduino successfully. That's great and thank you for that. This seems the core part of PIO is working.
What's missing is the PIO Home pages. I changed the HTTP_HOST to 0.0.0.0 also, but the PIO home page is not coming.
I always appreciate the work of you and your team. Thanks.
I just hit this as well, and I expect others will now that Codespaces is generally available in the free tier of GitHub.
I just hit this as well, and I expect others will now that Codespaces is generally available in the free tier of GitHub.
As GitHub have been prompting me to try Codespaces/VSC and I normally use PIO locally on a separate linux box, I have just come across the this issue too. Changing host in setting times out rather than refused when using 127. on a PC within a Chrome Browser. Any suggestions?
Also came across this issue trying to use PlatformIO on Github CodeSpaces... any fixes planned for this?
Any fixes planned for this?