From 46793cdf802d76e6202708915fab7c9d1f4c293d Mon Sep 17 00:00:00 2001 From: German Service Network Date: Sun, 19 May 2024 19:45:13 +0200 Subject: [PATCH] Debug with Visual Studio Code --- .vscode/launch.json | 35 +++++++++++++++++++++++++++++++++++ .vscode/tasks.json | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..38aa472 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,35 @@ +{ + "configurations": [ + { + "name": "Debug fping", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/src/fping", + "args": ["127.0.0.1"], + "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": "build", + "postDebugTask": "autoclean", + "miDebuggerPath": "/usr/bin/gdb", + "logging": { + "engineLogging": false + } + } + ], + "version": "2.0.0" +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..43c9d70 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,45 @@ +{ + "tasks": [ + { + "type": "shell", + "label": "autogen", + "command": "./autogen.sh", + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [] + }, + { + "type": "shell", + "label": "configure", + "command": "./configure", + "args": ["--enable-debug"], + "group": { + "kind": "build", + "isDefault": true + }, + "dependsOn": ["autogen"], + "problemMatcher": [] + }, + { + "type": "shell", + "label": "build", + "command": "make", + "args": ["CFLAGS=\"-g -O0\""], + "group": { + "kind": "build", + "isDefault": true + }, + "dependsOn": ["configure"], + "problemMatcher": ["$gcc"] + }, + { + "type": "shell", + "label": "autoclean", + "command": "./autoclean.sh", + "problemMatcher": [] + } + ], + "version": "2.0.0" +} \ No newline at end of file