Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

print long string in xcode 6 debugging console

I am getting only 1022 characters of my String to display in the debugging console of Xcode6. The actual length is around 2500 characters.

Is there a way to display all character in the console or do i have to write them in a file.

i have tried print in the console but that displays only 1023 characters.

First i tried with println(sqlstatement), that did not work. Second, as mentioned above, i used print sqlstatement in the debug console itself. Oh and debugger is lldb.

Regards Adarkas

like image 828
Adarkas2302 Avatar asked Jul 14 '15 08:07

Adarkas2302


People also ask

How do I print a variable in Xcode?

If the variable is an image or other type that isn't expressible as text, click the Quick Look button at the upper-right to see a preview of the variable. Click the Print Description button to print a description of the object in the console.

How do I print from Xcode?

In Swift with Xcode you can use either print() or NSLog() . print() just outputs your text. Nothing more.


1 Answers

I found an answer thanks to your comment @nms. The command line for lldb is

setting set target.max-string-summary-length 10000 

with 10000 being the number of characters that are printed.

I haven`t found a nicer way to set this setting for lldb, other than typing it every time i debug, than to set a breakpoint in AppDelegate to auto continue and adding the above command to it.

like image 153
Adarkas2302 Avatar answered Sep 18 '22 15:09

Adarkas2302