As a Polyglot Software Engineer, a significant part of your work will require you to ensure that your code always works consistently no matter where it is run. Java in itself provides some of this but not all. Please follow through these instructions to get set up in Visual Studio code with a sandbox environment.
For a background on containers in VSCode - please read VS Code Remote - Containers extension in a few easy steps.
Follow these steps to open this sample in a container:
-
Since this is likely your first time using a development container, please follow the getting started steps.
-
To use this repository, open the repository in an isolated Docker volume (we'll cover these steps in the workshop):
- Fork this repository on your own GitHub
- Clone your fork of this repository to your local filesystem.
- Follow the prompts to setup your Docker instance
- Post any questions to the channel.
Once you have this sample opened in a container, you'll be able to work with it like you would locally.
- Edit:
- Open
src/main/java/com/mycompany/app/App.java. - Try adding some code and check out the language features.
- Open
- Terminal: Press Ctrl+Shift+` and type
unameand other Linux commands from the terminal window. - Build, Run, and Debug:
- Open
src/main/java/com/mycompany/app/App.java. - Add a breakpoint.
- Press F5 to launch the app in the container.
- Once the breakpoint is hit, try hovering over variables, examining locals, and more.
- Open
- Run a Test:
- Open
src/test/java/com/mycompany/app/AppTest.java. - Put a breakpoint in a test.
- Click the
Debug Testin the Code Lens above the function and watch it hit the breakpoint.
- Open
Note: We'll be adding features to this as we go and you'll be given access to new branches in this repository to base your ideas on.