Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you stop the XCode debugger from autocompleting without options?

Tags:

The debugger is really (de)bugging me. Every time I try to type a po ... command, it autocompletes (without giving me any options) and I end up typing stuff like po [selfelf and so on until I go mad. Is there any way of stopping this, or of always giving me the autocomplete popup like in the standard editor?

like image 655
jrturton Avatar asked Aug 25 '11 18:08

jrturton


People also ask

How do I enable debug mode in Xcode?

When you run an application in Xcode, the debugger is automatically started and attached to the process of the application. Click the Run button in the top left or press Command + R. From the moment the application is up and running, we can start inspecting the process and, if necessary, debug it.

What is debugger in Xcode?

The Xcode debugger provides several methods to step through your code and inspect variables. You can precisely control execution of your code from a breakpoint, stepping into and out of called functions as necessary to determine where your bug occurs.

What is debug in Swift?

The Swift REPL can be used for debugging, to test and interact with your app. When code breaks, typing repl into LLDB will allow you to interactively test code. You can call methods with different arguments, and test new functions by adding them to your existing code.


2 Answers

This answer applied to the GDB debugger which is no longer the standard debugger used with Xcode

This is achieved by adding the following line to the "readline init file" (which, by default, I think does not exist). I created the file ~/.inputrc and put the following text in it:

set disable-completions 'On'
like image 127
jrturton Avatar answered Oct 24 '22 06:10

jrturton


Hmm, the accepted answer is kind of overkill.

How about the answer provided to this question:

The closest I've come to solving this incredibly annoying problem is to turn off automatic code completion in general (Preferences > Text Editing > Suggest Completions While Typing) and then hit esc whenever I actually do want code completion.

like image 38
mts Avatar answered Oct 24 '22 08:10

mts