-
Notifications
You must be signed in to change notification settings - Fork 0
Description
The current procedure to open the GUI is stated in the README.md:
GUI openen
De GUI opent automatisch in Simple Browser nadat de game is gestart.
Als de GUI niet automatisch opent:
Klik op ports, klik bij port 6080 (GUI) op "Open in Browser" (wereldbol) of "Preview in Editor" (rechts van wereldbol)
Klik met je muis op de GUI om het toetsenbord aan je game te koppelen.
Allthough this works in a classroom with students, it would be nice if the GUI opened on loading the workspace.
Students work with the web-version of VS Code in Codespaces.
I did several attempts, but I couldn't find a reliable solution.
"onAutoForward": "openPreview"in devcontainer.json doesn't work most of the time, besides: once it is closed by the user, the user still needs to rely on the procedure described in README.md- Create a tasks.json with a shell task that activates an input on loading the workspace, the input starts the simpleBrowser.show command. this works only for a hardcoded name of the codespace
- Create a custom extension that is called on loading the workspace. It works only for a hardaced name of the codespace
In 2 and 3 I was not able to use ${CODESPACE_NAME} to create the correct URL. I assume the evironment variable is not availble on the client side where vscode-web is running and executing a command in vscode doesn't work on the server side. If this is true, it may be a reason that makes it difficult to find a reliable solution.
Maybe anybody can find a solution or confirm that this is never going to work reliable.
I created this issue to document my findings so far.