Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能否自定义debug配置,解决macOS 15.0以上系统不能断点调试问题 #19

Closed
eddylin83 opened this issue Dec 20, 2019 · 7 comments · Fixed by #20
Closed

Comments

@eddylin83
Copy link
Contributor

macos更新后,debug小按钮失效了

点击debug按钮,虽然能运行,但是不能调试,相当于直接运行程序。不过不是插件问题,试了一下,是cppdbg这个调试类型调试不了程序了,最后换了一个类型(安装codelldb插件,也可以调试rust的玩意),就可以了。不过插件的debug小按钮固定使用一个debug配置,现在每个项目都要用vscode自带的调试了。

@waruqi
Copy link
Member

waruqi commented Dec 20, 2019

回头我看下

@waruqi
Copy link
Member

waruqi commented Dec 20, 2019

macos更新后,debug小按钮失效了

点击debug按钮,虽然能运行,但是不能调试,相当于直接运行程序。不过不是插件问题,试了一下,是cppdbg这个调试类型调试不了程序了,最后换了一个类型(安装codelldb插件,也可以调试rust的玩意),就可以了。不过插件的debug小按钮固定使用一个debug配置,现在每个项目都要用vscode自带的调试了。

之前主要是为了方便用户省去配置步骤,所以内置写死类型了,回头研究下,不过可能要等上段时间了,最近空闲时间不多

如果急需的话,你可以直接拉取xmake-vscode源码,用vscode加载运行 帮忙改进下这块,然后提个pr上来。

@eddylin83
Copy link
Contributor Author

好的,我看看。主要是没研究过vscode插件怎么开发。先close了。

@waruqi
Copy link
Member

waruqi commented Dec 20, 2019

很简单的,直接vscode打开插件工程目录,加载运行就可以了,什么环境都不用配置,只有最后发布才需要。。

可以看下这篇介绍:https://tboox.org/cn/2017/10/11/xmake-vscode/

@waruqi
Copy link
Member

waruqi commented Dec 21, 2019

#20

@waruqi
Copy link
Member

waruqi commented Mar 24, 2020

这里稍微备注下,通过配置:xmake.debugConfigType 到 codelldb 启用macos 15.0以上系统的调试支持,另外先装下lldb和vscode的c/c++插件

由于custom类型配置会覆盖原有debug type (lldb),这里做了些修复,只需要xmake.customDebugConfig里面加上自定义配置,就可以局部覆盖一些调试器配置,并且保证lldb还是有效启用的,而custom type就去掉了
#27
#26

比如追加sourceMap配置,对lldb指定其他源码加载目录:

"xmake.debugDebugConfig": {
  "type": "codelldb"
},
"xmake.customDebugConfig": {
  "sourceMap": {
    "../../src": "xxxx/xxxx/xxx/src"
  }
}

@waruqi waruqi changed the title 能否自定义debug配置 能否自定义debug配置,解决macOS 15.0以上系统不能断点调试问题 Mar 24, 2020
@waruqi
Copy link
Member

waruqi commented Mar 24, 2020

我刚改进了下插件,只要用户装了codelldb插件,xmake-vscode在mac下就会自动检测优先使用它,不需要额外的配置,不过如果用到了sourceMap,还是需要自己配置下的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants