Debug Stream
| Line 49: | Line 49: | ||
| | | | ||
{| class="parameterTable" cellpadding="5%" width="100%" | {| class="parameterTable" cellpadding="5%" width="100%" | ||
| − | ! width="20%" style="border-style: solid; border-width: 0px 0px | + | ! width="20%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Parameter |
| − | ! width="60%" style="border-style: solid; border-width: 0px 0px | + | ! width="60%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Explanation |
| − | ! width="20%" style="border-style: solid; border-width: 0px 0px | + | ! width="20%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Data Type |
|- | |- | ||
| − | | style="border-style: solid; border-width: | + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|''sFormatString'' |
| − | | style="border-style: solid; border-width: | + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|A string to write to the debug stream<br />(can be formatted!) |
| − | | style="border-style: solid; border-width: | + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|[[Data_Types#dataType_string|string]] |
|- | |- | ||
|} | |} | ||
| Line 78: | Line 78: | ||
| | | | ||
{| class="parameterTable" cellpadding="5%" width="100%" | {| class="parameterTable" cellpadding="5%" width="100%" | ||
| − | ! width="20%" style="border-style: solid; border-width: 0px 0px | + | ! width="20%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Parameter |
| − | ! width="60%" style="border-style: solid; border-width: 0px 0px | + | ! width="60%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Explanation |
| − | ! width="20%" style="border-style: solid; border-width: 0px 0px | + | ! width="20%" style="border-style: solid; border-width: 0px 0px 1px 0px"|Data Type |
|- | |- | ||
| − | | style="border-style: solid; border-width: | + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|''sFormatString'' |
| − | | style="border-style: solid; border-width: | + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|A string to write to the debug stream<br />(can be formatted!) |
| − | | style="border-style: solid; border-width: | + | | style="border-style: solid; border-width: 1px 0px 0px 0px"|[[Data_Types#dataType_string|string]] |
|- | |- | ||
|} | |} | ||
Revision as of 14:26, 25 January 2012
|
Main >> NXT >> Functions and Variables >> Debug Stream |
|
| |||||||
“Traditional” Debugging Techniques
Debugging a program – finding the errors and correcting them – can be a slow process in solutions without a run-time debugger. Without a debugger you may have to resort to different techniques like:
Both of the above techniques are available in ROBOTC. However, a real-time debugger eliminates the need to resort to them. There’s no need to add code for debugging to your program. A built-in debugger provides better functionality without ever having to modify your source code! There is also a built-in Debug Stream that you can use to keep track of your program from behind the scenes. For example, you could print a message to the Debug Stream when you enter and exit loops, functions, etc. Then you can view the cached Debug Stream to help in the debugging process. |
writeDebugStream
| void writeDebugStream(const string sFormatString, ...) | ||||||
| (void) Writes a String to the Debug Stream. | ||||||
| ||||||
|
writeDebugStreamLine
| void writeDebugStreamLine(const string sFormatString, ...) | ||||||
| (void) Writes a String to the Debug Stream starting on a new line. | ||||||
| ||||||
|
