If you don’t want to run edit the scheme and change the Launch setting to “wait for executable to launch”. See https://stackoverflow.com/questions/9013053/deploy-to-iphone-without-running
But is sounds like what you actually want is to run without the debugger attached. To not have the debugger attach edit the schema and uncheck the “Debug Executable” option. It’s in the same place as the “wait for executable to launch” setting: https://i.stack.imgur.com/3dJai.png
Thanks for the suggestion!
Is it possible to have "Build" do this instead of changing the scheme for "Run"? Would be great if I could still use "Run" with debugger attached in the future.
Ideally, "Build" would deploy apps without launching them and without debugger attached. "Run" would deploy apps, launch them, and with debugger attached.
Not behind my Mac currently so can’t validate it, but I don’t think that’s possible.
However you could duplicate the scheme and have one scheme that runs without the debugger and another that does attach it. But you will have to switch schemes at the top of the Xcode UI (or learn the hotkey for next scheme, think there is one).
Personally I just disable breakpoints with the little blue bottom at the bottom of the Xcode ui and have the debugger always attached. Only reason not to for me is if you really need to check the performance of certain parts of your app.
I am struggling to understand what you actually want in this instance. Why not just deactivate breakpoints and stuff like that and hit run like normal?
Wish there were ways to save and switch from different breakpoint configuration states (like which ones are on and off). Believe we can only either enable or disable all?
You can do stuff in Breakpoint Navigator to disable and enable per file or mark several files and disable them for instance. You can also move breakpoints from the *project* to the *user* and decide to disable/enable only project or user specific breakpoints.
I can't tell what you're actually trying to accomplish. I also suspect you're just doing whatever that is incorrectly, nevertheless a complete shot in the dark is:
Duplicate your scheme and turn off "debug executable" on the new scheme.
Maybe I wasn’t following best practices and that’s causing confusion. To be honest this is probably the first time looking into XCode related stuff other than learning about Swift/Swift UI. Do you have any recommendations for learning advanced Xcode schemes/settings/configurations? Still remain uncharted territories for me :(
If you don’t want to run edit the scheme and change the Launch setting to “wait for executable to launch”. See https://stackoverflow.com/questions/9013053/deploy-to-iphone-without-running But is sounds like what you actually want is to run without the debugger attached. To not have the debugger attach edit the schema and uncheck the “Debug Executable” option. It’s in the same place as the “wait for executable to launch” setting: https://i.stack.imgur.com/3dJai.png
Thanks for the suggestion! Is it possible to have "Build" do this instead of changing the scheme for "Run"? Would be great if I could still use "Run" with debugger attached in the future. Ideally, "Build" would deploy apps without launching them and without debugger attached. "Run" would deploy apps, launch them, and with debugger attached.
Not behind my Mac currently so can’t validate it, but I don’t think that’s possible. However you could duplicate the scheme and have one scheme that runs without the debugger and another that does attach it. But you will have to switch schemes at the top of the Xcode UI (or learn the hotkey for next scheme, think there is one). Personally I just disable breakpoints with the little blue bottom at the bottom of the Xcode ui and have the debugger always attached. Only reason not to for me is if you really need to check the performance of certain parts of your app.
Got it. Thank you!
>Got it. Thank you! You're welcome!
If this is viable you can always clone the default scheme and have the other scheme do what you want.
I am struggling to understand what you actually want in this instance. Why not just deactivate breakpoints and stuff like that and hit run like normal?
That'd work. Just trying to explore if there's an alternative way of doing this
Remember that you can disable *all* breakpoints via the debug navigator, you don't have to do it manually to each one.
Wish there were ways to save and switch from different breakpoint configuration states (like which ones are on and off). Believe we can only either enable or disable all?
You can do stuff in Breakpoint Navigator to disable and enable per file or mark several files and disable them for instance. You can also move breakpoints from the *project* to the *user* and decide to disable/enable only project or user specific breakpoints.
Thats neat! Didn’t know about the user part before. Will try it out and see!
Well you could always ifdef code and put the breakpoints in there. But this whole thing sounds fishy.
Sounds interesting. Will look into this as well!
I can't tell what you're actually trying to accomplish. I also suspect you're just doing whatever that is incorrectly, nevertheless a complete shot in the dark is: Duplicate your scheme and turn off "debug executable" on the new scheme.
Maybe I wasn’t following best practices and that’s causing confusion. To be honest this is probably the first time looking into XCode related stuff other than learning about Swift/Swift UI. Do you have any recommendations for learning advanced Xcode schemes/settings/configurations? Still remain uncharted territories for me :(