From 7aeb470d0c48bbfad5265e28ff5999bbd0ff30bb Mon Sep 17 00:00:00 2001 From: LuChiChick <1084116302@qq.com> Date: Thu, 7 Aug 2025 15:59:32 +0800 Subject: [PATCH] add vscode debug config --- .vscode/c_cpp_properties.json | 19 +++++++++++++++++++ .vscode/launch.json | 25 +++++++++++++++++++++++++ .vscode/tasks.json | 16 ++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 .vscode/c_cpp_properties.json create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..1edd018 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,19 @@ +{ + "configurations": [ + { + "name": "Win32", + "includePath": [ + "${workspaceFolder}/Inc", + "${workspaceFolder}/**" + ], + "defines": [ + "UNICODE", + "_UNICODE" + ], + "cStandard": "c17", + "cppStandard": "c++17", + "intelliSenseMode": "windows-gcc-x64" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..377bbcb --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,25 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "[SrcToA2L]构建并调试", + "type": "cppdbg", + "request": "launch", + "preLaunchTask": "project_build_task", // 预构建脚本 + "program": "${workspaceFolder}\\Build\\SrcToA2L.exe", // 调试目标 + "args": [ // 附加参数 + ".\\Test\\typedef.h", + ".\\Inc\\Type_Descriptions.hpp", + ".\\Test\\input.c", + "-r", + ".\\Test\\PVER.a2l", + "-m", + ".\\Test\\PVER.map", + ], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", // 工作目录 + "environment": [], + // "console": "externalTerminal", + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..b95ea25 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,16 @@ +{ + "tasks": [ + { + "label": "project_build_task", //定义的Task标签 + "type": "shell", //Task执行的类型 + "options": { + "cwd": "${workspaceFolder}" // 工作目录 + }, + "command": "make", //运行的命令 + "args": [ + "-j4" // 附加参数 + ], + } + ], + "version": "2.0.0" +} \ No newline at end of file