Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I disable gdb variable name auto-complete in Xcode 4 console? [duplicate]

Tags:

xcode

gdb

lldb

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 311
jrturton Avatar asked Aug 25 '11 18:08

jrturton


People also ask

How do I stop GDB from running?

To exit GDB, use the quit command (abbreviated q ), or type an end-of-file character (usually C-d ). If you do not supply expression , GDB will terminate normally; otherwise it will terminate using the result of expression as the error code.

What is the GDB command that will show the address of the next instruction to execute when the current function reaches its one return statement?

It is often useful to do ' display/i $pc ' when stepping by machine instructions. This makes GDB automatically display the next instruction to be executed, each time your program stops.

Does Xcode use GDB?

This page explains how to build and install gdb on macOS using #Homebrew or #Fink. Since Mavericks 10.9, Xcode 5 no longer installs gdb by default and not globally.


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 125
jrturton Avatar answered Sep 19 '22 16:09

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 36
mts Avatar answered Sep 19 '22 16:09

mts