From cb038f0c66acb1c490eb2c314a2204da2d9b4e1c Mon Sep 17 00:00:00 2001 From: Joakim Hunskaar <joakim.borge.hunskar@gmail.com> Date: Thu, 30 Jan 2025 20:33:08 +0100 Subject: [PATCH] added new launch config and build task --- configuration/.vscode/launch.json | 31 +++++++++++++++++++++++++++++-- configuration/.vscode/tasks.json | 28 +++++++++++++++++++++++++--- 2 files changed, 54 insertions(+), 5 deletions(-) diff --git a/configuration/.vscode/launch.json b/configuration/.vscode/launch.json index defc8d3..817f50a 100644 --- a/configuration/.vscode/launch.json +++ b/configuration/.vscode/launch.json @@ -8,7 +8,34 @@ "args": [], "cwd": "${workspaceFolder}", "preLaunchTask": "Build Executable", - "internalConsoleOptions": "neverOpen", + "internalConsoleOptions": "neverOpen" + }, + { + "name": "C/C++: TDT4102 Build and Run Debug", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/builddir/program", + "args": [], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + }, + { + "description": "Set Disassembly Flavor to Intel", + "text": "-gdb-set disassembly-flavor intel", + "ignoreFailures": true + } + ], + "preLaunchTask": "TDT4102 Build Executable", + "miDebuggerPath": "gdb" } - ] + ], + "version": "2.0.0" } \ No newline at end of file diff --git a/configuration/.vscode/tasks.json b/configuration/.vscode/tasks.json index aac3879..4b4f59c 100644 --- a/configuration/.vscode/tasks.json +++ b/configuration/.vscode/tasks.json @@ -4,8 +4,29 @@ { "type": "shell", "label": "Build Executable", + "command": "meson compile -Cbuilddir", + "group": "build", + "presentation": { + "echo": true, + "reveal": "always", + "focus": false, + "panel": "shared", + "showReuseMessage": true, + "clear": true + }, + "problemMatcher": [] + }, + { + "type": "cppbuild", + "label": "TDT4102 Build Executable", "command": "meson", - "args": ["compile", "-Cbuilddir"], + "args": [ + "compile", + "-Cbuilddir" + ], + "options": { + "cwd": "${workspaceFolder}" + }, "group": { "kind": "build", "isDefault": true @@ -17,7 +38,8 @@ "panel": "shared", "showReuseMessage": true, "clear": true - } + }, + "detail": "Task generated by TDT4102 ." } ] -} +} \ No newline at end of file -- GitLab