Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
143 views
in Technique[技术] by (71.8m points)

ios - 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

question from:https://stackoverflow.com/questions/31402092/print-long-string-in-xcode-6-debugging-console

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...