0

I an trying to find out how to debug iphone program without using xcode by reading here but I cannot get it to work

I managed to change my Xcode setting (Xcode 10) so that the .app file that gets created after build is now inside a folder within my project folder. This makes it easier to get the path to the .app file for lldb, and I can load the app file in lldb using something like

$ lldb /Projects/Sketch/build/Debug/Sketch.app

but I am not sure what to do from here onwards. I tried process launch and run, but they don't seem to start the .app file in debug mode like Xcode does. What should I do to start debugging iphone project outside Xcode?

The things I specifically want to do:

  • put breakpoints at particular lines of the .m files (in the same way I would click on the line number in a running iphone program in Xcode to put a breakpoint there)

  • while at a debug point, display values in arrays using matplotlib (this is the main reason I am trying to run lldb outside of Xcode, as it looks like matplotlib doesn't work in the lldb console in Xcode)

  • single step, step over and step out in the C code

user13267
  • 6,871
  • 28
  • 80
  • 138
  • Have you seen https://stackoverflow.com/a/10112466/5329717 ? And I'd start with verifying if matplotlib would work with raw lldb on some simple MaOS "helloWorld" in C as it will be much easier to setup. – Kamil.S Nov 22 '18 at 10:30
  • @Kamil haden't seen that thanks for the link. And if I only start lldb on terminal (not attaching to anything) then matplotlib definitely works, so I guess it should work while debugging a program as well. By reading around questions on the site I have got the idea that matplotlib doesn't work if lldb is being used from within the xcode console, but should work otherwise – user13267 Nov 22 '18 at 11:05
  • perhaps capturing `stdout` and / or `stderr` output from the `Simulator` outside of `XCode` (but while still using it) would suffice for your case https://stackoverflow.com/questions/10165641/how-can-i-get-the-console-logs-from-the-ios-simulator – Kamil.S Nov 22 '18 at 11:23
  • @Kamil I'll be working on an iphone not the simulator, but may be those posts will give some clue on how to do it – user13267 Nov 22 '18 at 11:35

0 Answers0