Recently, the cocos2d-x engine added a telnet remote debugger, the usage is very simple, first start test Cpp Demo, then open the terminal, enter:
Telnet local host 5678
Connect to the testcpp built-in debugging server.
Currently, there are not many supported commands, and they are being added...
However, the telnet terminal does not support command history. If you press the upper and lower keys on the keyboard in telnet, garbled characters such as ^ [A ^ [[B, which is too inconvenient.
I plan to add a buffer on the server to support command history. But how can I remove garbled characters from the client? It seems that only echo is disabled. On mac, telnet ECHO is enabled by default...
Google: How can I enable telnet Echo? I didn't find it... But it surprised me to find a good thing: rlwrap
This is a special tool used to support telnet History commands. The usage is as follows:
Rlwrap telnet local host 5678
After the connection is successful, enter several commands and press the upper and lower keys on the keyboard. No garbled characters are displayed on the terminal, but historical commands ~~ Shuang
Rlwrap can be installed through macports
Sudo port install rlwrap
If you have not installed macports, you can download the macports installation package from the official website.
Http://www.macports.org/