Reputation: 93
I'm trying to debug a unit test with the resharper testrunner but it's not working. Before my breakpoint is hit Visual Studio pops up a message box "There is no source code available for the current location." If I press OK it says LoadFromContextException.
Ideas anyone?
Upvotes: 8
Views: 7166
Reputation: 71
I had a slightly different problem. I uncovered where the exception was been thrown when trying to launch debug with Debug -> Exceptions -> Common Language Runtime Exceptions (checked)
If found I was encountering an UnauthorizedAccessException. This was because my referenced NUnit.Framework.dll was read only.
Unchecking readonly resolved the problem.
Upvotes: 7
Reputation: 41
Here is what worked for me (turned out to be unrelated to re-sharper in any way, though): check that paths listed under Tools > Options > Debugging > Symbols are reachable (e.g. some paths leading to network shares).
In my case, I once used debug symbols located on a network share to debug crash dump and left the network paths in the list 'just in case', and as soo as the host that the share was located on was then removed from the network, it took several minutes for the debugger to understand that it is unable to load any symbols from each of the 3 locations.
Upvotes: 4
Reputation: 1889
Make sure you haven't changed the exception settings in Visual Studio: Debug -> Exceptions. Uncheck Thrown for Managed Debugging Assistants. This should fix the problem.
Upvotes: 10