From 03a313085586b6e45f27ff445bea5b8e71582748 Mon Sep 17 00:00:00 2001 From: AndreaRigoni Date: Wed, 8 Apr 2026 08:21:13 +0000 Subject: [PATCH] feat: add VS Code debugging configuration and environment dependencies for gcompose --- .vscode/gdb_wrapper.sh | 3 +++ .vscode/launch.json | 31 +++++++++++++++++++++++++++++++ .vscode/tasks.json | 17 +++++++++++++++++ condaenv.yml | 2 ++ 4 files changed, 53 insertions(+) create mode 100755 .vscode/gdb_wrapper.sh create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json diff --git a/.vscode/gdb_wrapper.sh b/.vscode/gdb_wrapper.sh new file mode 100755 index 0000000..8e77dba --- /dev/null +++ b/.vscode/gdb_wrapper.sh @@ -0,0 +1,3 @@ +#!/bin/bash +export DISPLAY=:1001.0 +/home/share/micromamba/bin/micromamba run -n uLib /usr/bin/gdb "$@" diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..fe2e42a --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,31 @@ +{ + // 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": [ + { + "name": "gcompose", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/build/app/gcompose/gcompose", + "args": [], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [ + { "name": "DISPLAY", "value": ":1001.0" } + ], + "externalConsole": false, + "MIMode": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ], + "preLaunchTask": "Build gcompose", + "miDebuggerPath": "${workspaceFolder}/.vscode/gdb_wrapper.sh" + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..2a3a1f9 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,17 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Build gcompose", + "type": "shell", + "command": "/home/share/micromamba/bin/micromamba run -n uLib cmake --build build --target gcompose -j$(nproc)", + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [ + "$gcc" + ] + } + ] +} diff --git a/condaenv.yml b/condaenv.yml index 14370d4..62debfd 100644 --- a/condaenv.yml +++ b/condaenv.yml @@ -17,3 +17,5 @@ dependencies: - ccache - OpenMP - Geant4 + - gdb + - valgrind