+ 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?

4th Aug 2016, 1:08 AM
Playjoy “Kungpoww” Of Death
Playjoy “Kungpoww” Of Death - avatar
3 Answers
+ 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.
5th Aug 2016, 4:52 AM
Nick Nderitu
Nick Nderitu - avatar
+ 1
no, you cant write basically anything, when the program is debugging.
4th Aug 2016, 4:28 AM
RĂłbert PĂ©cz
RĂłbert PĂ©cz - avatar
+ 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.
4th Aug 2016, 8:40 AM
Andreas BeEm Kvist
Andreas BeEm Kvist - avatar