Home >Development Tools >sublime >How to configure sublimegdb
SublimeGDB 的配置
如何在 Sublime Text 中配置 SublimeGDB?
配置 SublimeGDB 涉及以下步骤:
1. 安装 SublimeGDB 包
2. 安装 GNU 调试器 (GDB)
brew install gdb
)或 MacPorts(sudo port install gdb
)安装 GDB。sudo apt-get installgdb
)安装 GDB。3. 配置 SublimeGDB 设置
<code>"sublimegdb": { "gdb_path": "/path/to/gdb" }</code>
gdb_path
替换为 GDB 的安装路径。4. 配置构建系统
<code>{ "cmd": ["gdb", "-q", "$file"], "file_regex": "^(.*):(\\d+):(\\d+)$", "selector": "source.c, source.cpp" }</code>
$file
替换为调试器命令的正确占位符(通常为 %f
)。file_regex
替换为与调试输出匹配的正则表达式。5. 设置断点
6. 启动调试会话
The above is the detailed content of How to configure sublimegdb. For more information, please follow other related articles on the PHP Chinese website!