开发者

Is it possible to add comments to the source code while debugging with C++?

开发者 https://www.devze.com 2022-12-24 17:26 出处:网络
while debugging a C++ program with GDB, is it possible somehow to add comments to the original souce code whitout affecting to the debugging process?

while debugging a C++ program with GDB, is it possible somehow to add comments to the original souce code whitout affecting to the debugging process?

I started to debug with GDB, but if I modify (just adding comments at the end of each C++ code line wiht //) the code, when I display the code in GDB I get weird display.开发者_如何学JAVA

Thanks


Adding inline comments on existing lines should not pose a problem.

Adding new comments will break the existing line order (since debug symbols are per line number), giving you a shifted line display while debugging.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号