5

I would like to not use the debugger (gdb), though I want to get output from my application (from stdout and stderr).

I find that I never use it, I always use NSLog (or, for C printf and for C++ std::cout).

How can I disable the debugger (even in the debug configuration)?

Paul R
  • 208,748
  • 37
  • 389
  • 560

4 Answers4

5

Next to run and stop - click on the Scheme area, select edit scheme - then on build configuration select release.

Not sure if that what you meant.

Kunal
  • 323
  • 1
  • 2
  • 9
4

In XCode 4 - at the top left where the Run and Stop buttons are, there's a drop down selection (the Scheme selection), click on the left drop down and then 'Edit Scheme...' Next, locate and click on your Debug scheme (should be titled 'Run YourAppName.app') on the left. Now in the main content area, click on the 'Info' tab and change your Debugger selection to None - save your settings by clicking OK

XCode 4 turn off Debugger in Debug scheme

slavlazar
  • 204
  • 3
  • 5
  • 2
    There's no such an option in my xcode4, you can chose the debugger between lldb and gdb, no None. I need to disable it because crashlytics needs to. – Cristi Băluță Jul 31 '13 at 07:39
4

If you mean the debugger console, then you can control whether it automatically appears using the Behaviors preference panel. If you want to see the output, you can instead have Xcode automatically navigate to the current run log (also controlled by Behaviors) on launch or (I think) as soon as there's any output.

If you really mean to say you don't use the debugger in general (pausing at breakpoints and examining variables, stepping through code, etc. then you're hurting yourself in a way that makes most developers cringe. It's like a carpenter boldly proclaiming he doesn't use the equivalent reality-checking tools: a tape measure and level. I hope I misunderstood you there.

Joshua Nozzi
  • 60,946
  • 14
  • 140
  • 135
  • You didn't. :) I never used breakpoints, variable examination or stepping through code. The way I examine variables is with NSLog and I always found it sufficient. –  Aug 03 '11 at 18:27
  • 1
    (facepalm) Oh, man, are you in for a Renaissance-sized treat. Seriously - do yourself a *huge* favor and look beyond "sufficient." There's a whole world of problems out there logging alone can't identify and more than a few it can't identify even *with* help. Don't *disable* the debugger. **Learn to use it.** – Joshua Nozzi Aug 03 '11 at 20:15
  • 1
    Just as a followup - and I don't mean this in a nasty way - I wouldn't hire any developer who claims not to use the debugger. It would never be taken as a developer who just never needed it but rather as a beginner who doesn't know any better. It wouldn't matter what your resume said. :-} – Joshua Nozzi Aug 03 '11 at 20:18
3

Xcode Debug executable

Debug executable - allows you to use debugger(breakpoints...) to debug binary

XCode v9.2

Project name -> Edit Scheme... -> Run -> deselect "Debug executable"

enter image description here

[Debug Build Configuration]

yoAlex5
  • 29,217
  • 8
  • 193
  • 205