X
wikiHow is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, volunteer authors worked to edit and improve it over time.
This article has been viewed 48,315 times.
Learn more...
The act of debugging helps the programmer to track "What went wrong logically?" in the program code.
Steps
-
1Type a C++ program in Turbo C++ editor.
-
2To add a breakpoint, follow these sub-steps:
- Place the cursor at start of code where breakpoint needs to be placed
- Go to Debug->Toggle Breakpoint. (Shortcut: Ctrl + F8).
- A red highlight appears over the code.
Advertisement -
3Run the program. Use Run -> Run (Ctrl+F9).
- The program run breaks where you have inserted breakpoint with a blue highlight.
-
4Press F8 (Step Over)/F7 (Trace Into).
-
5Add watches (Shortcut:Ctrl+F7) to the print value of any variable during execution.
-
6Done. This way you can easily debug through the code. Happy debugging!
Advertisement
About This Article
Advertisement