Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

How do you use Debug in C++?

+1 vote
asked Nov 13, 2025 by john oneal (130 points)

1 Answer

0 votes
answered Nov 20, 2025 by Peter Minarik (101,340 points)
See the User Manual on the documentation page of GDB: https://www.sourceware.org/gdb/documentation/

You can also search for some tutorials.

This sample is from the official documentation: https://sourceware.org/gdb/current/onlinedocs/gdb.html/Sample-Session.html#Sample-Session. It will allow you to see a basic example of stepping through the code and printing the values of variables located on the stack.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...