From f03ef0678a7f0b6cfb5e5c1e88f1b7540bcac4cb Mon Sep 17 00:00:00 2001 From: Hannes Olszewski Date: Sun, 14 Mar 2021 21:50:55 +0100 Subject: [PATCH 1/3] Add run configurations for all templates --- templates/cpp/.vscode/launch.json | 13 ++++++++ templates/cpp/.vscode/tasks.json | 11 +++++++ templates/csharp/.vscode/launch.json | 49 +++++++++++++--------------- templates/python/.vscode/launch.json | 6 ++-- 4 files changed, 50 insertions(+), 29 deletions(-) create mode 100644 templates/cpp/.vscode/launch.json create mode 100644 templates/cpp/.vscode/tasks.json diff --git a/templates/cpp/.vscode/launch.json b/templates/cpp/.vscode/launch.json new file mode 100644 index 0000000..d1470ec --- /dev/null +++ b/templates/cpp/.vscode/launch.json @@ -0,0 +1,13 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Launch", + "type": "cppdbg", + "request": "launch", + "preLaunchTask": "Build and run project", + "program": "", + "cwd": "${workspaceFolder}", + } + ] +} diff --git a/templates/cpp/.vscode/tasks.json b/templates/cpp/.vscode/tasks.json new file mode 100644 index 0000000..e385d76 --- /dev/null +++ b/templates/cpp/.vscode/tasks.json @@ -0,0 +1,11 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Build and run project", + "type": "shell", + "command": "cmake --build ${workspaceFolder}/build --config Debug --target ExampleProject_run -- -j 14 && ${workspaceFolder}/build/src/ExampleProject_run", + "group": "build" + } + ] + } diff --git a/templates/csharp/.vscode/launch.json b/templates/csharp/.vscode/launch.json index 271d258..14663ee 100644 --- a/templates/csharp/.vscode/launch.json +++ b/templates/csharp/.vscode/launch.json @@ -1,27 +1,24 @@ { - // Use IntelliSense to find out which attributes exist for C# debugging - // Use hover for the description of the existing attributes - // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md - "version": "0.2.0", - "configurations": [ - { - "name": ".NET Core Launch (console)", - "type": "coreclr", - "request": "launch", - "preLaunchTask": "build", - // If you have changed target frameworks, make sure to update the program path. - "program": "${workspaceFolder}/src/AddFunction/bin/Debug/netcoreapp3.0/AddFunction.dll", - "args": [], - "cwd": "${workspaceFolder}/src/AddFunction", - // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console - "console": "internalConsole", - "stopAtEntry": false - }, - { - "name": ".NET Core Attach", - "type": "coreclr", - "request": "attach", - "processId": "${command:pickProcess}" - } - ] -} \ No newline at end of file + "version": "0.2.0", + "configurations": [ + { + "name": ".NET Core Launch (console)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + "program": "${workspaceFolder}/src/AddFunction/bin/Debug/netcoreapp3.0/AddFunction.dll", + "args": [], + "cwd": "${workspaceFolder}/src/AddFunction", + "console": "integratedTerminal", + "stopAtEntry": false, + "internalConsoleOptions": "openOnSessionStart", + "pipeTransport": { + "pipeCwd": "${workspaceFolder}/src/AddFunction", + "pipeProgram": "bash", + "pipeArgs": ["-c"], + "debuggerPath": "/home/coder/bin/netcoredbg/netcoredbg", + "quoteArgs": true + } + } + ,] + } \ No newline at end of file diff --git a/templates/python/.vscode/launch.json b/templates/python/.vscode/launch.json index 17e15f2..bac082c 100644 --- a/templates/python/.vscode/launch.json +++ b/templates/python/.vscode/launch.json @@ -5,11 +5,11 @@ "version": "0.2.0", "configurations": [ { - "name": "Python: Current File", + "name": "Python: main.py", "type": "python", "request": "launch", - "program": "${file}", + "program": "${workspaceFolder}/main.py", "console": "integratedTerminal" } ] -} \ No newline at end of file +} From 29c1b204f0eaa9f5bd04305d659512872d90d4a2 Mon Sep 17 00:00:00 2001 From: Henning Kasch Date: Mon, 15 Mar 2021 10:39:30 +0100 Subject: [PATCH 2/3] Update C++ run config --- templates/cpp/.vscode/launch.json | 6 +++--- templates/cpp/.vscode/tasks.json | 27 ++++++++++++++++++++------- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/templates/cpp/.vscode/launch.json b/templates/cpp/.vscode/launch.json index d1470ec..20f23ca 100644 --- a/templates/cpp/.vscode/launch.json +++ b/templates/cpp/.vscode/launch.json @@ -5,9 +5,9 @@ "name": "Launch", "type": "cppdbg", "request": "launch", - "preLaunchTask": "Build and run project", - "program": "", + "preLaunchTask": "Build Project", + "program": "${workspaceFolder}/build/src/ExampleProject_run", "cwd": "${workspaceFolder}", } ] -} +} \ No newline at end of file diff --git a/templates/cpp/.vscode/tasks.json b/templates/cpp/.vscode/tasks.json index e385d76..1d06d33 100644 --- a/templates/cpp/.vscode/tasks.json +++ b/templates/cpp/.vscode/tasks.json @@ -1,11 +1,24 @@ { "version": "2.0.0", "tasks": [ - { - "label": "Build and run project", - "type": "shell", - "command": "cmake --build ${workspaceFolder}/build --config Debug --target ExampleProject_run -- -j 14 && ${workspaceFolder}/build/src/ExampleProject_run", - "group": "build" - } + { + "label": "Create build directory", + "type": "shell", + "command": "mkdir -p ${workspaceFolder}/build" + }, + { + "label": "Run CMake", + "type": "shell", + "dependsOn": "Create build directory", + "command": "cmake -B ${workspaceFolder}/build", + "group": "build" + }, + { + "label": "Build Project", + "type": "shell", + "dependsOn": "Run CMake", + "command": "cmake --build ${workspaceFolder}/build --config Debug --target ExampleProject_run", + "group": "build" + } ] - } +} \ No newline at end of file From 5fb42a1d32efc40fd4afc12ac9d30f8961f54462 Mon Sep 17 00:00:00 2001 From: Henning Kasch Date: Thu, 18 Mar 2021 14:48:11 +0100 Subject: [PATCH 3/3] Ignore C# obj files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 1b6985c..09d4fc2 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ # Ignore Gradle build output directory build +templates/csharp/**/obj