+ 1
Can you use comments to debug?
When debugging, can you use comments to find where error are occurring? if so, would doing so cause more problems and is there an easier way to debug?
3 odpowiedzi
+ 2
Comments do not give any overhead whatsoever to your code at runtime. The compiler completely ignores them. Debugging can be a very tedious and time consuming problem, however most IDEs today come with debugging tools which may be of great help. Try running your programs in debugging mode which will allow you have a general scope of what your code entails.
+ 1
no, you cant write basically anything, when the program is debugging.
+ 1
Comments seve no puropose to the program itself
Comments exist to help you, the programmer to understand your code easier. Aswell as others looking at your code.