• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Xcode 4.5.2 won't actually run my shell tool
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode 4.5.2 won't actually run my shell tool


  • Subject: Re: Xcode 4.5.2 won't actually run my shell tool
  • From: Quincey Morris <email@hidden>
  • Date: Fri, 21 Dec 2012 13:43:28 -0800

On Dec 21, 2012, at 12:46 , "Theodore H. Smith" <email@hidden> wrote:

I press the "Run" button on the top-right of the screen, and... nothing happens. Well actually, the bottom of the window flickers, for a moment I can see the "console window" appear, and then disappear. as if my program ran in 0.05 of a second or something.

BUT I coded my program explicitly, to run for 10 seconds! So something is wrong, it should not just run in 0.05 of a second!

I tried adding an "exit(-1)" at the start of my main function. And... re-run, nothing. No error. The program runs just fine.

Is there any reason you can't set a breakpoint in your main () and step through your code? That procedure hasn't changed from Xcode 3 in any significant detail.

I tried finding the shell tool I just built, and it's not in a build folder next to the project like it used to be. Much to my dismay, it was buried somewhere in "Users/theodore/Library/Xcode". I tried running it directly via Terminal, and... same thing, it just completes normally as if I didn't enter "exit(-1)" at the start of my program.

Yes, it's a conceptual change in Xcode 4. Everything in the "buried" derived data is (sort of) private to Xcode, or at least (sort of) intermediate. Xcode doesn't build the final "product" unless it has to, for example when you choose "Archive" from the "Product" menu. Note that an ordinary build doesn't run any build phases that are marked as "run only when installing", which is why your executable doesn't get copied from the derived data to somewhere easier to find, on a normal build.

If you want to be retro, you can also (through a combination of workspace settings and preferences) configure Xcode 4 to use a build folder of the Xcode 3 variety.

But all of that seems unnecessary. You should be able to solve the original problem from within Xcode and the debugger. Note that if the console pane disappeared when execution finished, you can re-display it using View -> Debug Area -> Show Debug Area, and it should still contain any log messages that execution produced. You can also change preferences (Behaviors pane) to prevent the debug area from hiding if it contains any messages at the end of execution (or at all, if you wish).

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Xcode 4.5.2 won't actually run my shell tool
      • From: "Theodore H. Smith" <email@hidden>
References: 
 >Xcode 4.5.2 won't actually run my shell tool (From: "Theodore H. Smith" <email@hidden>)

  • Prev by Date: Re: problem with finding framework header file under Xcode 4.5.2 (fixed)
  • Next by Date: Re: Xcode 4.5.2 won't actually run my shell tool
  • Previous by thread: Xcode 4.5.2 won't actually run my shell tool
  • Next by thread: Re: Xcode 4.5.2 won't actually run my shell tool
  • Index(es):
    • Date
    • Thread