Skip to content

Somtimes breakpoints dont get hit. #2

@michaelc37

Description

@michaelc37

in my case it was not monodevelop was not hitting breakpoints if they were in a constructor (however it works with normal/base gdb plugin).

i tracked it down to DGdbBacktrace.CreateVarObject when called from GdbBacktrace.GetParameters. It might need try catch around the "return Variables.EvaluateVariable (exp);" similarly to the base GdbBacktrace.CreateVarObject ..

either of these worked for me, not sure which is better
1)
try {
return Variables.EvaluateVariable (exp);
} catch {
return base.CreateVarObject (exp);
}

  1.      try {
             return Variables.EvaluateVariable (exp);
         } catch {
             return ObjectValue.CreateUnknown (exp);
         }
    

I understand that this does not help fix the true problem of why an exception is occuring in the first place, but at least it does not prevent the breakpoints from being hit.

callstack when i noticed this behavior:
MonoDevelop.Debugger.Gdb.D.DGdbBacktrace.CreateVarObject (exp="this")
MonoDevelop.Debugger.Gdb.GdbBacktrace.GetParameters
MonoDevelop.Debugger.Gdb.D.DGdbBacktrace.GetParameters
Mono.Debugging.Client.StackFrame.GetParameters
MonoDevelop.Debugger.StackTracePad.EvaluateMethodName
MonoDevelop.Debugger.StackTracePad.Update
MonoDevelop.Debugger.StackTracePad.UpdateDisplay

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions