Debug Stream
From ROBOTC API Guide
(→“Traditional” Debugging Techniques) |
|||
| Line 1: | Line 1: | ||
<yambe:breadcrumb self="Debug Stream">General|General Programming</yambe:breadcrumb> | <yambe:breadcrumb self="Debug Stream">General|General Programming</yambe:breadcrumb> | ||
<br /> | <br /> | ||
| + | '''Dexter Industries''' has created a great introductory blog post on the debug stream, which can be [http://dexterindustries.com/howto/using-debugger-stream-in-robotc-for-lego found here]. | ||
| + | |||
{{tl|1|1}} | {{tl|1|1}} | ||
Latest revision as of 09:53, 20 July 2012
General Programming → Debug Stream
Dexter Industries has created a great introductory blog post on the debug stream, which can be found here.
|
| |||||||
“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 such as:
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. | ||||||
| ||||||
|
