This project is based in part on work from Microsoft can be found on GitHub. Refer to the License section below for acknowledgement of Microsoft licences for their original works.
This project lets you use the VS Code Remote - Containers extension in a few easy steps with the Skycoin CX programming language.
Note: At this time VS Code Remote - Containers is only available as part of the Insiders build. You will need to install the Insders version of VS Code to use Remote Containers.
Note: If you're following the quick start, you can jump to the Things to try section.
Follow these steps to open this sample in a container:
-
If this is your first time using a development container, please follow the getting started steps.
I stongly suggest you get the Microsoft vscode-remote-try-go example working first. If you cannot get that working you will not be able to get the CX environment working either.
-
If you're not yet in a development container:
- Clone this repository.
- Press F1 and select the Remote-Containers: Open Folder in Container... command.
- Select the cloned copy of this folder, wait for the container to start, and try things out!
Once you have this sample opened in a container, you'll be able to work with it like you would locally.
Some things to try:
- Edit:
- Open
helloworld.cx
- Try adding some code and check out the language features.
- Open
- Terminal: Press ctrl+shift+` and type
uname
and other Linux commands from the terminal window.- Run the command
cx -v
to determine the version of CX running inside the remote container.
- Run the command
- Build, Run, and Debug:
- Open
helloworld.cx
- Add a breakpoint (e.g. on line 22).
- Press F5 to launch the app in the container.
- Once the breakpoint is hit, try hovering over variables, examining locals, and more.
- Continue, then open a local browser and go to
http://localhost:9000
and note you can connect to the server in the container.
- Open
- Forward another port:
- Stop debugging and remove the breakpoint.
- Open
server.go
- Change the server port to 5000. (
portNumber := "5000"
) - Press F5 to launch the app in the container.
- Press F1 and run the Remote-Containers: Forward Port from Container... command.
- Select port 5000.
- Click "Open Browser" in the notification that appears to access the web app on this new port.
Copyright © BigOokie. All rights reserved.
This is based on works from Microsoft Corporation which are subject to Copyright and licenced under the MIT License.
See LICENSE and MS-LICENCE in the project root for license information.