nianhua 2 лет назад
Родитель
Сommit
d0cc3e58f6
2 измененных файлов с 71 добавлено и 0 удалено
  1. 40 0
      .vscode/launch.json
  2. 31 0
      .vscode/task.json

+ 40 - 0
.vscode/launch.json

@@ -0,0 +1,40 @@
+{
+    // 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": "(gdb) Launch",        // 配置名称,可以根据需要修改
+            "type": "cppdbg",              // 调试器类型
+            "request": "launch",           // 请求类型:启动调试
+            "program": "${workspaceFolder}/build/fastweb",  // 指定要调试的可执行程序路径
+            "args": [
+                "start",
+                "/home/nianhua/www/config.ini"
+            ],                    // 程序运行时的命令行参数
+            "stopAtEntry": false,          // 是否在程序入口停止
+            "cwd": "/home/nianhua/www",   // 工作目录
+            "environment": [],             // 运行时的环境变量
+            "externalConsole": false,      // 是否使用外部终端
+            "MIMode": "gdb",               // 使用GDB作为调试器
+            "miDebuggerPath": "/usr/bin/gdb",  // GDB的路径
+            "preLaunchTask": "build",      // 调试前执行的任务
+            "logging": {
+                "engineLogging": true      // 启用引擎日志记录
+            },
+            "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
+                }
+            ]
+        }
+    ]
+}

+ 31 - 0
.vscode/task.json

@@ -0,0 +1,31 @@
+{
+    "version": "2.0.0",
+    "tasks": [
+        {
+            "label": "build",
+            "type": "shell",
+            "command": "cmake",
+            "args": [
+                "--build",
+                "${workspaceFolder}/build"
+            ],
+            "group": {
+                "kind": "build",
+                "isDefault": true
+            },
+            "problemMatcher": []
+        },
+        {
+            "label": "configure",
+            "type": "shell",
+            "command": "cmake",
+            "args": [
+                "-S",
+                "${workspaceFolder}",
+                "-B",
+                "${workspaceFolder}/build"
+            ],
+            "problemMatcher": []
+        }
+    ]
+}