cocos2dx Mac platform print a long string, game cards dead

1. Open the console output, output stuck solution:

Open the console: game -console enable

Close the console: game -console false

Modify the file ConsoleWindowController.m

#define SKIP_LINES_COUNT    300
#define MAX_LINE_LEN        409600
#define MAX_LINES_COUNT     20000

MAX_LINE_LEN macro meaning MAX_LINE_LEN characters up line of the log. If the string length exceeds MAX_LINE_LEN to be output, it is truncated, and is replaced ...

SKIP_LINES_COUNT macro SKIP_LINES_COUNT meaning from the line, taken in excess of MAX_LINE_LEN string.

That is, after 300 before the first line, what you give, what I am. 300 lines of output, you gave a long string that will be output after the interception

MAX_LINES_COUNT macro meaning the number of rows can accommodate up output console. Here is 20,000 lines, if the line reached 20,000, the most before the information is deleted,

After the output is always to ensure that the output console only 20,000 lines.

If the print failure to modify the value of MAX_LINE_LEN

2. If you do not turn on the console, using luaide tool for debugging output if the card appears dead, then

Modify the log file CCConsole.cpp method:

Delete Director :: getInstance () -> getConsole () -> log (buf); this statement then recompile the project.

 

So that all outputs are vscode, and will not appear stuck up.  

If the output of a very long, appeared in the case of interception, then modify the macro MAX_LOG_LENGTH

 

Guess you like

Origin www.cnblogs.com/dzqdzq/p/11440043.html