I have a bit of code which is calling the InvokeMember method on a Type. This is fine and works however if an exception occurs within the member being invoked then the debug jumps to where I am calling InvokeMember as opposed to the inner exception.
Is it possible to get around this so that the code debugs as expected?
Yes it is possible. Press Ctrl-Alt-E in Visual Studio to bring up theExceptions dialog box. Check the box to break on Thrown Common Language Runtime Exceptions (not just User-unhandled ones). Now debug your code and you will find it breaks inside your reflection-invoked method.