XCode doesn't break in #include'd CPP files

前端 未结 1 1951
执念已碎
执念已碎 2021-01-01 00:25

If you include a CPP file from another CPP file, XCode refuses to break at any breakpoints in the included CPP file. I\'m going to raise a bug with Apple but just wanted to

1条回答
  •  盖世英雄少女心
    2021-01-01 01:07

    Thanks to a reply over on the Apple developer forums I have now solved this problem.

    The compiler is in-lining these files and by default LLDB doesn't break on in-lined files. To force it to break you need to add a setting to your .lldbinit file.

    Edit (or create) the file ~/.lldbinit and add the following line:

    settings set target.inline-breakpoint-strategy always
    

    It's as simple as that!

    0 讨论(0)
提交回复
热议问题