0

Environment

Using VSCode Devcontainer extension to attach and debug a process running in an ubuntu 22.04 devcontainer.

GDB version is 12.1

Steps to reproduce

If I:

  • disable a breakpoint while broke, that should be hit again later
  • continue execution
  • attempt to enable the breakpoint again

The breakpoint remains greyed out and says "attempting to bind to breakpoint" indefinitely.

Expected

A means to re-enable breakpoints

Tried

The pause button has no effect nor does F6.

Tried going to the "debug console" and typing break, which results in a message: "Unable to perform this action because the process is running."

Summary

I cannot set or enable a disabled breakpoint while the code is executing and cannot pause its execution. It's become a rather large annoyance to have to start the entire process over again from the top.

Is there a mechanism/step I missed or anything I can do to re-enable a breakpoint while executing?

6
  • What you are describing works for me. I have a simple program, and I can choose to enable or disable breakpoints while debugging. I am also able to add breakpoints while debugging. This is on Windows, using MSVC in VS Code via cmake. Commented Jan 6 at 15:38
  • I will also add that simply searching for "breakpoint" (Ctrl + Shift + P) shows commands for "Disable all breakpoints" and "Enable all breakpoints." They are not bound by a keyboard shorcut by default, but that is rather trivial to set yourself. Commented Jan 6 at 15:47
  • @sweenish See edited comment in post. I might have to do with the dev container extension. When I enable a breakpoint that was previously red and enabled, but I disabled, they greyed out and will not enable again. Commented Jan 6 at 15:50
  • @sweenish did a second edit to be more explicit for reproduction instructions. Commented Jan 6 at 15:52
  • I am currently unable to test a dev container setup. But it is good information to have in the question. Commented Jan 6 at 15:55

0

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.