Bob,
I don't know how to do what you are asking, except in an add-in, possibly,
but if you just want to know where the line that caused the exception is, do
the following:
In the Solution Explorer, right click on the project, click the Properties
menu option. In the dialog, click on Configuration Properties, Build, and
check the Generate Debugging Information. That will put line numbers in the
PDB. When you get an exception, trap the ex as System.Exception, print out
(msgbox) ex.ToString and you will get the failing line. You can then Set
Next Statement to the offending line to be able to check the status of
variables at the time of the failure.
HTH
Les Smith
http://www.KnowDotNet.com
"Bob" <no****@nowhere.com> wrote in message
news:OB****************@TK2MSFTNGP09.phx.gbl...
In code when I'm handling an exception, I'd like to be able to tell the
debugger, if it's attached, to break and then navigate to where the
exception was thrown, which won't be where I break. Is that possible?
Bob