0

I am debugging a C++ program with gdb. After running gdb python, I set the breakpoints and run the program. However, after I quit the program, I leave the gdb debugger altogether.

If I make a change in my code and would like rerun the program, I have to do the whole process again. Run 'gdb python`, type the breakpoints (because the commands are not in the history), etc.

Is there a more efficient way to deal with this debugging problem?

2 Answers 2

1

I leave the gdb debugger altogether

Why? Don't do that.

Instead, leave GDB running, rebuild your program (in another terminal), then use GDB run command again to re-run the rebuilt program.

Sign up to request clarification or add additional context in comments.

1 Comment

Alright, thanks for clearing the idea, I wasn't sure how to do it before, quit did not work.
0

I realized Ctrl +C does the job @EmployedRussian is talking about.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.