美文网首页
Mac os visual studio code如何编译调试C

Mac os visual studio code如何编译调试C

作者: 王国的荣耀 | 来源:发表于2023-05-16 20:39 被阅读0次

环境

mac os monterey
vs code 1.78.2, 相关插件是最新的。
xcode:14.2

无法调试原因

  1. 未知
  2. 初步分析为vs code的问题。

相关淘汰

  1. c/c++相关编译过程都添加了-g
  2. cppdbg和lldb无法调试,lld、gdb(gdb重新签名了)都无法调试。
  3. 最终分析结束:*stopped,reason="breakpoint-hit",disp="del",bkptno="1",frame={level="0",addr="0x00000001000165d0",func="main",

最终:

  1. 使用windows来分析相关c++过程。
  2. 废弃visual studio code来调试c++代码。
  3. 使用Clion来调试相关的代码。

c++ 断点一直灰 ,无法调试

1: (3244) ->=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",pending=["main"],times="0",addr="0x00000001000165d0",func="??",file="??",fullname="??/??",line="0",original-location="main"}

1: (3244) ->=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",pending=["main"],times="0",addr="0x00000001000165d0",func="??",file="??",fullname="??/??",line="0",original-location="main"}

1: (3244) ->21 locations added to breakpoint 1

21 locations added to breakpoint 1

1: (3281) ->*stopped,reason="breakpoint-hit",disp="del",bkptno="1",frame={level="0",addr="0x00000001000165d0",func="main",args=[],file="??",fullname="??",line="-1"},thread-id="1",stopped-threads="all"

相关文章

网友评论

      本文标题:Mac os visual studio code如何编译调试C

      本文链接:https://www.haomeiwen.com/subject/ugubsdtx.html