Debugging Feature of Turbo C++:
· Turbo C++ is an IDE (integrated development
environment) tool. It provides us the facility to create, edit, delete, run,
compile, and debugging the programs.
·
Turbo C++ provides many useful Debugging
feature. Through these features, We can easily locate logical
·
And syntax errors. Debugging option is provided
us a separate menu named Debug in the menu bar. Here is the brief description
of these features.
Compiling a single line:
·
TC compiler provides an excellent option to compile
the program line by line. This enable the programmer to easily locate errors.
For compiling the single line at a time, select run Trace into OR pressing F7
shortcut key.
Watches:
·
Watches or watch expressions are used to check
the value of a variable during the program execution. It shows that how and when
the value particular variable is change. It is normally in combination with
compiling single lines.
Follow the procedure is used to apply the watch or watch expressions.
·
Compile the program line by line through
shortcut key F7.
·
During the execution, when control come to the line that contain required variable,
place the cursor on that variable whose value is to be checked.
·
Select debug watch from Menu bar. A sub will
appear.
·
Select add watch from the sub menu OR simply use
ctrl+F7 shortcut key. A dialog box will appear with selected variable shown in
Watch expression field.
·
Click OK or Press Enter. TC sub window shows an
error message automatically that shows the current value of the selected
variable.
Breakpoints:
It is the most successful and an effective technique of the
debugging. A breakpoint is a point in the program where the compiler
temporarily stops the program execution, so that the programmer can analyze necessary
values. TC provide easy way to use the mechanism for apply the breakpoints. A
breakpoint applied through two simple steps:
Place the cursor on the line where
you want to apply the breakpoint.
Select Debug Toggle breakpoint OR use
Ctrl +F8 shortcut key. Turbo C++ automatically stops the program execution when
control reached at that particular line.
No comments:
Post a Comment