Jim,
you’re right, I was getting a false positive with -Q, sorry for the confusion.
So it seems I’m having 2 issues on Xcode, right?
A - No rejection of illegal options (-Q)
B - “-q” with the correct queue name is not working.
Here’s what I’m doing for B:
1 - (lldb) thread info
thread #1: tid = 0xfc5f, 0x00000001070418f4 ThreadTest`ViewController.viewDidLoad(self=0x00007f940610d270) at ViewController.swift:16:9, queue = ‘com.apple.main-thread’, stop reason = breakpoint 1.1
2 - (lldb) breakpoint set --file ViewController.swift --line 26 -q com.apple.main-thread
Breakpoint 2: where = ThreadTest`ThreadTest.ViewController.viewDidLoad() → () + 942 at ViewController.swift:26:15, address = 0x0000000107041c0e
3 - (lldb) breakpoint list 2
2: file = ‘ViewController.swift’, line = 26, exact_match = 0, locations = 1, resolved = 1, hit count = 0 Options: enabled queue name: “com.apple.main-thread”
2.1: where = ThreadTest`ThreadTest.ViewController.viewDidLoad() → () + 942 at ViewController.swift:26:15, address = 0x0000000107041c0e, resolved, hit count = 0
On #1 I just make sure the queue name is correct, com.apple.main-thread, then on #2 I set the breakpoint with “-q”, and on #3 I make sure that the parameter was set correctly, and I do see the enabled queue name: “com.apple.main-thread” in there, but the breakpoint is never executed.
But if I set breakpoint set --file ViewController.swift --line 26, without -q, the breakpoint is executed normally.
And to check that the queue name is “com.apple.main-thread” when this breakpoint is executed I did the following:
1 - (lldb) breakpoint set --file ViewController.swift --line 26
Breakpoint 3: where = ThreadTestThreadTest.ViewController.viewDidLoad() -> () + 942 at ViewController.swift:26:15, address = 0x0000000104a01c0e **2 - (lldb) c** Process 1242 resuming **3 - (lldb) thread info** thread #1: tid = 0x11cd2, 0x0000000104a01c0e ThreadTest
ViewController.viewDidLoad(self=0x00007fcb15d09d50) at ViewController.swift:26:15, queue = ‘com.apple.main-thread’, stop reason = breakpoint 3.1
I can verify that on #3 the queue name is in fact com.apple.main-thread but if I add -q com.apple.main-thread, it doesn’t work.
At this point, I’m not sure what to do next, maybe file a radar with Apple?
Thanks for your help, I really appreciate it 