Does mdbg support conditional breakpoints?

290 Views Asked by At

I am debugging a "Hello World" program written in C# using mdgb, but it seems gdb-style conditional breakpoints failed to set in mdbg, e.g.

  [p#:0, t#:0] mdbg> when 1 sum>100
  Error: Invalid command syntax

TODO: fixme image

This is when related syntax, but i still don't know how to setup conditional breakpoint in mdbg, althoug I read mdbg documenation [MSDN]

TODO: fixme image

So what is cond 1 sum>100 in mdbg?

How do I set a breakpoint conditionally?

Edit 1 @ThomasWeller your when clause is correct in syntax, but it seems it's not a conditional breakpoint, since g hit the breakpoint again, and the when clause not works, if it works, g should break when sum is larger than 100, but in fact g breaks when sum is 1, far smaller than 100 :(

Edit 2 when BreakpointHit 1 do echo sum>100 not works

1

There are 1 best solutions below

4
Noah Falk On

Conditional Breakpoints aren't supported. If you were really really serious about getting conditional breakpoints in MDbg you could download the source and add the feature: http://www.microsoft.com/en-us/download/details.aspx?id=2282

Alternatively you could grab a free version of Visual Studio which supports conditional breakpoints.