Smocks icon indicating copy to clipboard operation
Smocks copied to clipboard

Breakpoints in Smock.Run context not being hit

Open vanderkleij opened this issue 9 years ago • 1 comments

While executing code from a Smock.Run(context => {...}) call, no breakpoints are being hit. Currently the only known workaround is to add a Debugger.Break() call, after which the code can be stepped through successfully.

Smocks writes PDBs for modified assemblies and these PDBs appear to get loaded correctly:

'SmocksTest.vshost.exe' (CLR v4.0.30319: Smocks-0dca9fb5-a7dd-40ec-8fd3-6fe1466cbe85): Loaded 'D:\Users\Tom\AppData\Local\Temp\eda385a6-5d0c-4dd5-b66a-18ac96db85dc.exe'. Symbols loaded.

The source of this problem therefore remains unknown. It is probably related to the fact that the code runs in a separate AppDomain.

vanderkleij avatar Jun 07 '15 20:06 vanderkleij

I've also noticed code coverage tools can't see past the different appdomain.

Stoom avatar Sep 24 '15 13:09 Stoom