Regardless of other options that may achieve the same result (i.e. adding breakpoints
by hand), is it possible to programmatically add a breakpoint into the source code of a Visual Studio project?
Such as:
try
{
FunctionThatThrowsErrors(obj InscrutableParameters);
}
catch(Exception ex)
{
Log.LogTheError(ex);
AddBreakPointToCallingFunction();
}
That way when you run in debug the next time, it will automatically have set breakpoints at all the points that caused trouble during the last run.
I'm not saying that's a particularly useful way of debugging. I'm just wondering if the capability is there.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…