leiflundgren
leiflundgren

Reputation: 2966

Break in debugger on Err.Raise

Is is possible to get the Visual Studio 2010 debugger to break when vb.net code is throwing Err.Raise ?

(I have found that stopping on all System.Exception works, but then I stop on several other exceptions as well, since the .net runtime sometimes throws and catches exceptions itself.)

Upvotes: 1

Views: 104

Answers (2)

Robert Beaubien
Robert Beaubien

Reputation: 3156

You can use the debugger break command:

Debugger.Break()

Upvotes: 0

SLaks
SLaks

Reputation: 887453

Open the Breakpoints window and add a new breakpoint at Microsoft.VisualBasic.ErrObject.Raise.
This will break whenever the Raise() method is called.

Upvotes: 1

Related Questions