1.9 KiB
1.9 KiB
Dev Container Info
This directory contains files to support running the code in a dev container. This allows you build and debug the code locally, either on a PC, Mac or linux machine.
This works using VSCode's dev container support.
Requirements
-
Docker – needed for building the docker image and for devcontainer workflow. Microsoft has an enterprise agreement with docker, details here
-
Dev Containers VSCode extension
- installation info is here
Running In DevContainer
This works either on windows/mac machine or via a remote SSH session on a linux machine (this is the only way that the integration tests can reliably run, debugging works in all modes)
- Go to the root of the repo in a command window
- Open vscode using
code .
- Click the Blue
><
thing in thr bottom left of the screen and selectreopen in container
(the first time this runs it will take some time as it will build the docker container for the dev environment based on the dockerfile in the .devcontainer directory) - Once it has opened, open a bash terminal in vscode
- run
make devcontainer
- you are now ready to run and debug the extension
Debugging
- configure the appropriate settings in the file
.devcontainer/extension-settings.json
(the default one enables thesimple
andprocess
tests for vmwatch but you can change it) - click the debug icon on the left and select
devcontainer run - enable
target- you can add more in
launch.json
as needed
- you can add more in
- set breakpoints as required
- hit f5 to launch the extension code