vscode报错“Unable to start debugging”“GDB Failed with message:”

这篇具有很好参考价值的文章主要介绍了vscode报错“Unable to start debugging”“GDB Failed with message:”。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

1、正常打开文件夹,新建一个cpp;

unable to start debugging,C++&QT,vscode,ide,编辑器

 2、配置编译器,ctrl shift p,C/C++,edit configration ui

unable to start debugging,C++&QT,vscode,ide,编辑器

3、运行,启动调试,弹出任务,默认选择第一个,直接报错“Unable to start debugging”“GDB Failed with message:”

unable to start debugging,C++&QT,vscode,ide,编辑器

unable to start debugging,C++&QT,vscode,ide,编辑器

 此时,有怀疑路径中文的,怀疑项目,千奇百怪,本质原因是第3步选择,编译器任务时,默认第一个是错的编译器是/usr/bin/cpp这个是错误的,解决方法三种:

方法1、在这一步应该选择/usr/bin/g++或者c项目就是/usr/bin/gcc,而不是第一个;

unable to start debugging,C++&QT,vscode,ide,编辑器

方法2、项目已经建立,左边窗口点击,task.json,然后第6行,command后面内容改为,usr/bin/g++即可;

unable to start debugging,C++&QT,vscode,ide,编辑器

 方法3、删除task.json,在点运行,又会提示你选择编译器任务,这次选择带/usr/bin/g++字样即可;

unable to start debugging,C++&QT,vscode,ide,编辑器

 文章来源地址https://www.toymoban.com/news/detail-592689.html

三种方法,成功后如下图:unable to start debugging,C++&QT,vscode,ide,编辑器

 

到了这里,关于vscode报错“Unable to start debugging”“GDB Failed with message:”的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 学习狂神docker报错解决:exec failed: unable to start container process: exec: “ip“: executable file not found

    问题:最近学习狂神的docker,34节,网络详解。下载tomcat镜像并启动成功。如图  在使用命令:   docker exec -it tomcat01 ip addr 查看容器ip地址时报错:OCI runtime exec failed: exec failed: unable to start container process: exec: \\\"ip\\\": executable file not found in $PATH: unknown  解决方案:安装工具 iproute

    2024年02月12日
    浏览(19)
  • OCI runtime exec failed: exec failed: unable to start container process:

    测试使用docker容器名字ping通容器与容器之间,出现 OCI runtime exec failed: exec failed: unable to start container process: exec: “ping”: executable file not found in $PATH: unknown 报错 重新测试 成功!

    2024年02月13日
    浏览(22)
  • 已解决Message: unknown error: Chrome failed to start: crashed (chrome not reachable)

    已解决selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed (chrome not reachable) (The process started from chrome location C:UsersAdministratorAppDataLocalGoogleChromeApplicationchrome.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed.) (Driver info: chromedriver=72.0.3

    2023年04月26日
    浏览(27)
  • [Selenium]Message: disconnected: Unable to receive message from rendererXXX:报错解决

    selenium.common.exceptions.WebDriverException: Message: disconnected: Unable to receive message from renderer   (failed to check if window was closed: disconnected: not connected to DevTools)   (Session info: MicrosoftEdge=115.0.xxxx.xxx)         示例中使用的是最新版本的 webdriver.EdgeOptions() 创建 edge_options 实例。然后使用

    2024年02月04日
    浏览(19)
  • OCI runtime create failed: runc create failed: unable to start container process: --docker加载镜像

    OCI runtime create failed: runc create failed: unable to start container process: exec: “env”: executable file not found in $PATH: unknown 运行docker容器时出现上述报错。 原因: 别人给我的镜像是已解压的,并且告知我是用load去加载镜像。 命令报错。 报错信息为: open /var/lib/docker/tmp/docker-import-*******

    2024年02月11日
    浏览(23)
  • Unable to start embedded Tomcat Nacos启动报错

    报错信息:Unable to start embedded Tomcat 无法加载内置的tomcat。 无需重新配置JDK,轻松解决 图1 图2 如再次启动报错:检查端口占用问题

    2024年02月02日
    浏览(20)
  • Message: no such element: Unable to locate element:selenium报错

           最近在使用selenium爬虫时遇到了这个报错,反复检查了自己xpath路径确认没有问题。但是程序还是会报错:“Message: no such element: Unable to locate element: {“method”:“xpath”,“selector”:“//*[@id=“rootWrapper”]/div/div/div/div[2]/div/div[2]/div/div/div/div[2]/div[2]/ul/li[1]”}”。 代码如

    2024年02月11日
    浏览(13)
  • 【docker】解决 Failed with result ‘exit-code‘和Start request repeated too quickly和Failed to start Docker

    目录 1、遇到问题 2、问题解决  journalctl -xeu docker.service ░░ Support: http://www.ubuntu.com/support ░░ ░░ The unit docker.service has entered the \\\'failed\\\' state with result \\\'exit-code\\\'. Mar 31 21:48:10 VM-8-16-ubuntu systemd[1]: Failed to start Docker Application Container Engine. ░░ Subject: A start job for unit docker.servic

    2024年02月14日
    浏览(16)
  • SpringBoot启动报错Unable to start web server; nested exception...

    在创建SpringBoot项目时,依赖加载,但是启动报错如下:Unable to start web server; nested exception… 网上找了很多,很多回答为版本不一致,但仔细检查,版本对应都修改好了,但是还是报这个错误,test却能够成功。 根据自测,是导入的依赖问题:注释掉或者删除即可 原因是在创建

    2024年02月12日
    浏览(25)
  • Android报错:java.lang.RuntimeException: Unable to start activity ComponentInfo

    在A类去继承AppCompatActivity,用B类去继承A类时,出现了这样的错误: java.lang.RuntimeException: Unable to start activity ComponentInfo  目前尚未找出错误,也未能理解。 试着让B类去继承Activity时 ,登录之后页面也是可以进行跳转的,但是写的东西用到了一些方法,例如:getSupportFragmentM

    2024年02月06日
    浏览(24)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包