Nicolas Holthaus Nicolas Holthaus - 1 year ago 69
C++ Question

break when watched expression becomes true

I'm using

visual studio code
with the
extension and
debugger on ubuntu 14.04.

I'm setting a watch expression in my program, which works as expected, but I'd like to trigger the debugger to break when that condition becomes true. How can you do that with
visual studio code
? The documentation is pretty thin on this subject.

Answer Source

Why don't you add a block that you can break at?

For example, make a condition:

    //stuff is happening
        std::cout<<"things happened"<<std::endl; //break here
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download