applicationhealth-extension.../.devcontainer
dpoole73 b484db311d
Changes to support running devcontainer based tests on Mac Silicon (#72)
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
2024-05-16 13:41:21 -07:00
..
Dockerfile Adding Kusto Telemetry to ApplicationHealthLinux v2 (#63) 2024-05-01 23:46:04 -07:00
README.md Resource governance, heartbeat and dev container changes (#43) 2023-11-30 18:38:07 -08:00
devcontainer.env Resource governance, heartbeat and dev container changes (#43) 2023-11-30 18:38:07 -08:00
devcontainer.json Changes to support running devcontainer based tests on Mac Silicon (#72) 2024-05-16 13:41:21 -07:00
extension-settings.json Adding Kusto Telemetry to ApplicationHealthLinux v2 (#63) 2024-05-01 23:46:04 -07:00

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

  1. Docker – needed for building the docker image and for devcontainer workflow. Microsoft has an enterprise agreement with docker, details here

    • Windows Installer is here
    • Mac installer is here
  2. 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)

  1. Go to the root of the repo in a command window
  2. Open vscode using code .
  3. Click the Blue >< thing in thr bottom left of the screen and select reopen 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)
  4. Once it has opened, open a bash terminal in vscode
  5. run make devcontainer
  6. you are now ready to run and debug the extension

Debugging

  1. configure the appropriate settings in the file .devcontainer/extension-settings.json (the default one enables the simple and process tests for vmwatch but you can change it)
  2. click the debug icon on the left and select devcontainer run - enable target
    • you can add more in launch.json as needed
  3. set breakpoints as required
  4. hit f5 to launch the extension code