From f70bc48ce23e8ab52d049188ea3ba6507c370313 Mon Sep 17 00:00:00 2001 From: Evan Date: Thu, 7 Nov 2024 07:07:31 +0800 Subject: [PATCH] Improve debugging experience of CMake (#3646) --- CMakePresets.json | 2 +- launch.vs.json | 70 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 launch.vs.json diff --git a/CMakePresets.json b/CMakePresets.json index 816bb54f60..b606168c37 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -100,7 +100,7 @@ }, "vendor": { "microsoft.com/VisualStudioSettings/CMake/1.0": { - "intelliSenseMode": "windows-gcc-x86" + "intelliSenseMode": "windows-clang-x86" } } }, diff --git a/launch.vs.json b/launch.vs.json new file mode 100644 index 0000000000..f1826812a5 --- /dev/null +++ b/launch.vs.json @@ -0,0 +1,70 @@ +{ + "version": "0.2.1", + "defaults": {}, + "configurations": [ + { + "type": "cppdbg", + "project": "CMakeLists.txt", + "projectTarget": "keeperfx.exe", + "name": "keeperfx.exe (gdb)", + "currentDir": "E:\\Games\\keeperfx_1_2_0_complete", + "cwd": "E:\\Games\\keeperfx_1_2_0_complete", + "args": [ + "-level", + "00001", + "-campaign", + "personal", + "-nointro", + "-alex" + ], + "program": "${debugInfo.target}", + "MIMode": "gdb", + "miDebuggerPath": "C:\\msys64\\mingw32\\bin\\gdb.exe", + "externalConsole": 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 + } + ] + }, + { + "type": "cppdbg", + "project": "CMakeLists.txt", + "projectTarget": "keeperfx_hvlog.exe", + "name": "keeperfx_hvlog.exe (gdb)", + "currentDir": "E:\\Games\\keeperfx_1_2_0_complete", + "cwd": "E:\\Games\\keeperfx_1_2_0_complete", + "args": [ + "-level", + "00001", + "-campaign", + "personal", + "-nointro", + "-alex" + ], + "program": "${debugInfo.target}", + "MIMode": "gdb", + "miDebuggerPath": "C:\\msys64\\mingw32\\bin\\gdb.exe", + "externalConsole": 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 + } + ] + } + ] +} \ No newline at end of file