]> git.gsnw.org Git - fping.git/commitdiff
Debug with Visual Studio Code
authorGerman Service Network <support@gsnw.de>
Sun, 19 May 2024 17:45:13 +0000 (19:45 +0200)
committerDavid Schweikert <david@schweikert.ch>
Sun, 9 Jun 2024 07:07:51 +0000 (09:07 +0200)
.vscode/launch.json [new file with mode: 0644]
.vscode/tasks.json [new file with mode: 0644]

diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644 (file)
index 0000000..38aa472
--- /dev/null
@@ -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 (file)
index 0000000..43c9d70
--- /dev/null
@@ -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