If you rethrow exception like the following C# code:
} catch ( Exception e )
{
// do something here with e, then rethrow
throw e;
}
Then the stack trace information will be lost after that.
To keep the stack trace information, you have to rethrow the exception like this:
} catch ( Exception e )
{
// do something here with e, then rethrow
throw;
}