0

I have a basic question on lldb in Xcode. When using lldb in Xcode, how you guys call the command previously executed ?

Typing the same command every time is very frustrated to me, and
now looking the way to call them in efficient way.

I know "command history" will list the command with the number,
and the $ will execute the command.

But is there something similar like ctrl-p/ctrl-n or ctrl-r in bash to show or search the previous commands ?
(lldb command running on terminal (not build-in lldb inside
Xcode) can do this.)

I'm using Xcode version 11.5(11E608c).

2 Answers 2

1

Use up arrow in the LLDB command prompt. It works similar to Terminal in that regard.

Sign up to request clarification or add additional context in comments.

2 Comments

Note, in the Xcode Debugger console, clicking outside the prompt line actually moves the cursor, so subsequent up and down arrow gestures move the cursor around in the console text. You have to make sure the prompt is on the prompt line for up and down arrow to work. But if up & down arrow (and ^p ^n) are still not working for you then, that's bug.
thanks a lot !! Somehow, I customized allow, ctrl-n and ctrl-p for key binding, that's why it did not work. after move back to the default keybinding, it works.
1

Type Ctrl R and then type part of the command you want. It'll display the first matching command. Keep typing Ctrl R and it will cycle through previous matching commands.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.