-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
无法调试 #33
Comments
你点的哪个调试?看下readme里面的演示图片,点底下toolbar里面的bug button调试按钮 并确保c/c++ vscode插件也装了 |
gdb装了么?录个屏我看下呢? |
|
用的VSCodium,我马上用vscode试一下 |
调试前,main入口断点下了么。。
这个跟xmake没啥关系吧,如果其他插件也带不起调试,那我就不清楚了 我现在也没linux的可视化环境,要么你直接clone下代码,用vscode打开项目根目录,然后点加载运行,帮忙调下插件里面debugger.ts地方,也没几行代码。 |
没有
vscode插件零经验,上手有点麻烦,用不用vscode还不一定,我还是先学习xmake再说吧。 |
需要自己现在main入库设置好断点,才能点调试运行,进行断点调试,你加上试试,如果还是不行 我现在也没环境给你调试,之前测试过 断点调试应该没问题的。 |
加了,不行 |
那就不知道了 |
用launch.json,路径固定可以调试,先这样了,也不麻烦。 |
既然launch.json可以了,那就帮忙对比下插件内置的launch.json配置差异,看下是那个配置不对导致的呗。。我也好改进下插件 Lines 87 to 103 in ab6032f
|
launch.json {
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "/path/to/linux/x86_64/debug/test",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
} |
主要就是这四个的差异,你可以先在你这里的launch.json里面吧 stopAtEntry/externalConsole设置成False,排除下这两个,如果这两没问题,多半是传入program的path有问题导致。。 可以git clone下xmake-vscode的源码,用vscode打开根目录, 在xmake.ts的下面代码块最后加上 log.info("targetName: " + targetName);
log.info("targetProgram: " + targetProgram); Lines 704 to 712 in ab6032f
然后点调试运行,然后在里面打开你的项目,调试你的程序时候在output里面给我看下输出,基本上就能查出原因了 |
先这样,打算先学一下vscode插件和xmake。 |
可以看下这个,#36 人家应该找到问题原因了,你可以试试最新版本 |
从这里来看貌似使用F5好像还是不支持,F5默认是调用的launch.json,编辑launch.json的方法意义不大,毕竟多个配置不可能一个个去改动的。 |
不用自己编辑launch.json,xmake-vscode内置传递了 launch.json,只需要点 工具栏最下面,xmake-vscode插件提供的调试按钮就行了。。f5等快捷键我暂时没加 |
test.cpp
用工具栏操作,点击编译和运行都可以,但是点击调试不行(无限等待),截图:
![2020-05-19_23-14](https://user-images.githubusercontent.com/3665590/82344923-37df3b00-9a27-11ea-9177-353794ce9cf6.png)
Version Info
The text was updated successfully, but these errors were encountered: