【问题标题】:Unable to start debugging when Weston is launched启动 Weston 时无法开始调试
【发布时间】:2017-10-06 09:38:34
【问题描述】:
从命令行启动 Weston 时启动调试会话会出现以下错误:
无法开始调试。初始化调试器终端失败。
我需要在 main 的开头设置一个断点(或使用“stopAtEntry”:true),当停止时我需要手动启动 Weston 并继续我的调试会话。
有什么办法可以避免吗?
Ubuntu 16.04、C++、Visual Studio Code 1.17
【问题讨论】:
标签:
c++
debugging
visual-studio-code
wayland
【解决方案1】:
我为我的问题找到了一个可能的解决方法/解决方案:
launch.json 包含一个名为“preLaunchTask”的属性,它可以执行在 tasks.json 中定义的任务。这样可以在调试开始前终止 Weston:
任务(tasks.json):
"taskName": "kill weston",
"type": "shell",
"command": "killall weston || true"
启动(launch.json):
"preLaunchTask": "kill weston"
现在我需要找到一种在调试会话开始后启动 Weston 的方法……知道吗?