Merge pull request #27 from cctv1237/mac-debug
Add vscode debug config with lldb on Mac M chips
This commit is contained in:
commit
d52a3e4ce2
12
.vscode/launch.json
vendored
12
.vscode/launch.json
vendored
@ -38,6 +38,18 @@
|
|||||||
"ignoreFailures": true
|
"ignoreFailures": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Mac lldb 启动",
|
||||||
|
"type": "cppdbg",
|
||||||
|
"request": "launch",
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"program": "${workspaceFolder}/bin/KF-GINS",
|
||||||
|
"args": ["./dataset/kf-gins.yaml"],
|
||||||
|
"stopAtEntry": true,
|
||||||
|
"environment": [],
|
||||||
|
"externalConsole": false,
|
||||||
|
"MIMode": "lldb",
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -137,10 +137,10 @@ sudo apt-get install gdb
|
|||||||
```
|
```
|
||||||
The debug operation is as follows:
|
The debug operation is as follows:
|
||||||
|
|
||||||
- Set compiler: open the Command Palette (Ctrl+Shift+P) and type "CMake: Select a Kit", select GCC for Linux or select the MSVC compilier for Windows
|
- Set compiler: open the Command Palette (Ctrl+Shift+P) and type "CMake: Select a Kit", select GCC for Linux, select "clang 15.0.0 arm64-apple-darwin23.5.0"(or above) for MacOS with M-series Chip or select the MSVC compilier for Windows
|
||||||
- Set compile parameter: type "CMake: Select Variant" in the Command Palette, select **Debug**
|
- Set compile parameter: type "CMake: Select Variant" in the Command Palette, select **Debug**
|
||||||
- Configure CMake: type "CMake: Configure" in the Command Palette, Compile Project: type "CMake: Build" in the Command Palette
|
- Configure CMake: type "CMake: Configure" in the Command Palette, Compile Project: type "CMake: Build" in the Command Palette
|
||||||
- Set debug startup option: click the fourth button on the left side of VSCode to open the "Run and Debug" menu (or the shortcut key Ctrl+Shift+D), and select "Windows 启动" or "Linux gdb 启动" at the top of this menu window.
|
- Set debug startup option: click the fourth button on the left side of VSCode to open the "Run and Debug" menu (or the shortcut key Ctrl+Shift+D), and select "Windows 启动", "Linux gdb 启动" or "Mac lldb 启动" at the top of this menu window.
|
||||||
- Start debugging, click the green triangle symbol at the top of the left window (or the shortcut key F5) to start debugging.
|
- Start debugging, click the green triangle symbol at the top of the left window (or the shortcut key F5) to start debugging.
|
||||||
|
|
||||||
|
|
||||||
|
@ -137,10 +137,10 @@ sudo apt-get install gdb
|
|||||||
|
|
||||||
调试操作如下:
|
调试操作如下:
|
||||||
|
|
||||||
- 选择编译器,打开命令面板(Ctrl+Shift+P)输入"CMake: Select a Kit",Linux选择gcc编辑器,Windows选择MSVC编译器
|
- 选择编译器,打开命令面板(Ctrl+Shift+P)输入"CMake: Select a Kit",Linux选择gcc编辑器,Windows选择MSVC编译器, MacOS M系列芯片选择”clang 15.0.0 arm64-apple-darwin23.5.0“或更高版本
|
||||||
- 设置编译参数,命令面板输入"CMake: Select Variant",选择 **Debug**
|
- 设置编译参数,命令面板输入"CMake: Select Variant",选择 **Debug**
|
||||||
- 配置CMake,命令面板输入"CMake: Configure",编译工程,命令面板输入"CMake: Build"
|
- 配置CMake,命令面板输入"CMake: Configure",编译工程,命令面板输入"CMake: Build"
|
||||||
- 选择调试启动选项,点击VSCode左侧第四个按钮打开“运行和调试”菜单(或快捷键Ctrl+Shift+D),左侧窗口上方选择“Windows 启动” 或 “Linux gdb 启动”
|
- 选择调试启动选项,点击VSCode左侧第四个按钮打开“运行和调试”菜单(或快捷键Ctrl+Shift+D),左侧窗口上方选择“Windows 启动”, “Linux gdb 启动” 或 ”Mac lldb 启动“
|
||||||
- 开始调试,点击左侧窗口上方的 绿色三角符号 开始调试(或快捷键F5调试)
|
- 开始调试,点击左侧窗口上方的 绿色三角符号 开始调试(或快捷键F5调试)
|
||||||
|
|
||||||
## 2 KF-GINS使用
|
## 2 KF-GINS使用
|
||||||
|
Loading…
x
Reference in New Issue
Block a user