0

Possible Duplicate:
Detecting if iOS app is run in debugger

I want to add some special handling code when my program is launched from Xcode Debugger (vs. directly launched from simulator or from device). When Xcode launches a program to debug, will it set an enviroment variable?

Community
  • 1
  • 1
XinXin LIU
  • 103
  • 1
  • 1
  • 5

1 Answers1

1

Simplest approach is to edit your debug scheme to pass a command line type argument, and detect it in main().

Steven McGrath
  • 1,717
  • 11
  • 20