From ed11be4555baab4fadf3ffad3bc8a563de930336 Mon Sep 17 00:00:00 2001 From: Dominik Andreas Date: Sat, 18 Nov 2023 18:42:49 +0000 Subject: [PATCH 1/3] add support for vscode devcontainer feature --- .devcontainer/devcontainer.json | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..5a240e92 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,23 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile +{ + "name": "hms-mqtt-publisher", + "image": "rust:buster", + + // Features to add to the dev container. More info: https://containers.dev/features. + "features": { + "ghcr.io/devcontainers/features/rust:1": {} + }, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Uncomment the next line to run commands after the container is created. + // "postCreateCommand": "cat /etc/os-release", + + // Configure tool-specific properties. + // "customizations": {}, + + // Connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root. + "remoteUser": "${localEnv:USER}" +} From eebd4d4773e0162eaf5c244d4e18e501a356ab61 Mon Sep 17 00:00:00 2001 From: Dominik Andreas Date: Sat, 18 Nov 2023 18:45:58 +0000 Subject: [PATCH 2/3] add default launch.json file for debugging --- .vscode/launch.json | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..6a10ceeb --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,21 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + // compile and debug src/main.rs + { + "name": "Debug src/main.rs", + "type": "lldb", + "request": "launch", + "cargo": { + "args": ["build", "--bin=hms-mqtt-publish"], // Cargo command line to build the debug target + // The rest are optional + "env": { }, // Extra environment variables. + "problemMatcher": "$rustc", // Problem matcher(s) to apply to cargo output. + }, + "args": [""], // Arguments to pass to the program. + }, + ] +} \ No newline at end of file From 75db1d6fd62925518626d1f4eadd1dc3c7a050dc Mon Sep 17 00:00:00 2001 From: Dominik Andreas Date: Sat, 18 Nov 2023 18:47:07 +0000 Subject: [PATCH 3/3] ignore changes to .vscode via .gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 6985cf1b..ed3bd95e 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,6 @@ Cargo.lock # MSVC Windows builds of rustc generate these, which store debugging information *.pdb + +# Ignore VS Code user settings +.vscode/ \ No newline at end of file