0

Want to build a debug tool to monitor the app, pause execution when bad things occur. Dev can continue run the program after be notified the problem.

May I just throw a exception or use a special signal?


I have tried raise(SIGSTOP), looks good. But the backtrace showed in Xcode is not exactly what I stop it. Can I make a real time stop?

Karl
  • 665
  • 4
  • 19

2 Answers2

0

If fatal error comes, it terminates by itself. If you want to

1) break code execution: Use breakpoints:

http://jeffreysambells.com/2014/01/14/using-breakpoints-in-xcode

2) log output:

  • use NSLog() for Objective-C
  • use print() for Swift

Swift: print() vs println() vs NSLog()

Community
  • 1
  • 1
pedrouan
  • 12,762
  • 3
  • 58
  • 74
0

Call a NOP method. In Xcode, put a symbolic breakpoint on that method.

matt
  • 515,959
  • 87
  • 875
  • 1,141