Reputation: 981
Xcode 6.4 does not stop on breakpoints in files that are #include
d in the main.cpp file. This is a C++ "command line tool" created in Xcode new project wizard.
To fix this I've tried what's suggested in the SO threads here, here and here.
That is, I've added a ~/.lldbinit file with settings set target.inline-breakpoint-strategy always
, I've created another one called ~/.lldbinit-Xcode, I've ran command source ~/.lldbinit
in lldb started from the terminal (no errors), I've cleaned the project and restarted both Xcode and my Mac. Still no luck.
Any more ideas on how to get this to work?
Upvotes: 0
Views: 456
Reputation: 61
I've tried that ~/.lldbinit-Xcode setting and it never works.
The only way I've found to make breakpoints work in included files was to set them using the (lldb) prompt.
ie you can do this br set --name MyFunction
of course if you want to break at main() it's too late because afaik you only get the lldb prompt after you've started running, by pausing.
There is a trick for that too. If you go to the breakpoint navigator and add a new symbolic breakpoint (use the + button at the bottom left) at main(), then right click that breakpoint in the navigator, select 'Move breakpoint to' and then select User.
When you restart the exe that breakpoint will always be set.
Afaict in Xcode 7.3, breakpoints set in included files by clicking in the gutter do not seem to work - only ones set using lldb
Rob
Upvotes: 1