In my team we are using breakpoints to improve our development cycle.
We do have for example shared breakpoints which autofill the credentials form. That way we can avoid always having to use Siri Remote to write usernames and passwords, without any change in our code.
Sadly at the moment the name that Xcode is giving to the breakpoints in the Breakpoints Navigator is not very meaningful for this type of use cases. Xcode is naming the breakpoints with the name of the function and the number of the line.
That makes very hard to find the right endpoint that you really want to activate. As an example, in the previous use case, when having multiple shared breakpoints with different credentials to autofill, it means having the same name for all the breakpoints.
Recently, since Xcode 11.4.1 we saw that there is a new "Name" field in the breakpoint forms, but providing a name does not make the breakpoint appear with that label in Xcode.
Is there a way to name shared breakpoint using this new "Name" field, or any other method?
We do have for example shared breakpoints which autofill the credentials form. That way we can avoid always having to use Siri Remote to write usernames and passwords, without any change in our code.
Sadly at the moment the name that Xcode is giving to the breakpoints in the Breakpoints Navigator is not very meaningful for this type of use cases. Xcode is naming the breakpoints with the name of the function and the number of the line.
That makes very hard to find the right endpoint that you really want to activate. As an example, in the previous use case, when having multiple shared breakpoints with different credentials to autofill, it means having the same name for all the breakpoints.
Recently, since Xcode 11.4.1 we saw that there is a new "Name" field in the breakpoint forms, but providing a name does not make the breakpoint appear with that label in Xcode.
Is there a way to name shared breakpoint using this new "Name" field, or any other method?
Hi,
After taking a closer look, this appears to be a bug in Xcode.
Could you please file a feedback describing your usage and the results you're getting, and share the feedback number here ?
As a workaround, you could use Xcode's console debugger to create named breakpoints by doing:
Unfortunately, the breakpoints named on the console debugger won't show up in Xcode's Breakpoint Navigator.
To list your newly named breakpoints, you can do:
One benefit of using the console debugger is that you can have all the lldb commands to create and name your breakpoints saved to a file contained in your Xcode project. This lldbinit file can then be checked into your version control system of choice (i.e. git) but more importantly, you can use it in the Scheme Editor as the LLDB Init File.
By doing so, every time you start a new debugging session, this file will be sourced by the debugger which will run all the commands that it contains.
After taking a closer look, this appears to be a bug in Xcode.
Could you please file a feedback describing your usage and the results you're getting, and share the feedback number here ?
As a workaround, you could use Xcode's console debugger to create named breakpoints by doing:
Code Block # Show all the breakpoints. (lldb) breakpoint list # Add a name to one of the breakpoint in the list. (lldb) breakpoint name add -N <breakpoint-name> <breakpoint-id>
Unfortunately, the breakpoints named on the console debugger won't show up in Xcode's Breakpoint Navigator.
To list your newly named breakpoints, you can do:
Code Block # Print the named breakpoints list. (lldb) breakpoint name list
One benefit of using the console debugger is that you can have all the lldb commands to create and name your breakpoints saved to a file contained in your Xcode project. This lldbinit file can then be checked into your version control system of choice (i.e. git) but more importantly, you can use it in the Scheme Editor as the LLDB Init File.
By doing so, every time you start a new debugging session, this file will be sourced by the debugger which will run all the commands that it contains.