b484db311d
I have been unable to run the integration tests locally since upgrading my laptop. I worked with kevin to figure out the issues and the tests are working now. 1. changing to build the test container using no-cache mode since if you have an old bad version it would not get rebuilt. 1. changing the devconatiner config to force running amd64 rather than arm64 1. tweaking the scripts to handle the slightly different process names and ps output when running in this way. now, the tests pass on mac |
||
---|---|---|
.. | ||
Dockerfile | ||
README.md | ||
devcontainer.env | ||
devcontainer.json | ||
extension-settings.json |
README.md
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