• 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: Conditional breakpoint on "NSThread.isMainThread() == false"?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Conditional breakpoint on "NSThread.isMainThread() == false"?


  • Subject: Re: Conditional breakpoint on "NSThread.isMainThread() == false"?
  • From: Quincey Morris <email@hidden>
  • Date: Tue, 17 Nov 2015 15:45:26 -0800
  • Feedback-id: 167118m:167118agrif8a:167118sGstlLe73v:SMTPCORP

On Nov 17, 2015, at 14:46 , Rick Mann <email@hidden> wrote:

Stopped due to an error evaluating condition of breakpoint 2.2: "[NSThread isMainThread] == false"
Couldn't parse conditional _expression_:
error: no known method '+isMainThread'; cast the message send to the method's return type

That’s a different issue, an old Obj-C/debugger problem. Try casting the method call:

(BOOL) [NSThread isMainThread] == NO

Note that because you’re making the test in the Obj-C domain now, the method result is a BOOL rather than a bool (or whatever proper booleans are called in Obj-C these days). Using ‘false’ is probably fine, but just to avoid any possible hinkiness about types, you’re safer comparing with NO or literal 0.

 _______________________________________________
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: Conditional breakpoint on "NSThread.isMainThread() == false"?
      • From: Rick Mann <email@hidden>
References: 
 >Conditional breakpoint on "NSThread.isMainThread() == false"? (From: Rick Mann <email@hidden>)
 >Re: Conditional breakpoint on "NSThread.isMainThread() == false"? (From: "Clark S. Cox III" <email@hidden>)
 >Re: Conditional breakpoint on "NSThread.isMainThread() == false"? (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: Conditional breakpoint on "NSThread.isMainThread() == false"?
  • Next by Date: Re: Conditional breakpoint on "NSThread.isMainThread() == false"?
  • Previous by thread: Re: Conditional breakpoint on "NSThread.isMainThread() == false"?
  • Next by thread: Re: Conditional breakpoint on "NSThread.isMainThread() == false"?
  • Index(es):
    • Date
    • Thread