cannot debug into my DbContext derived class code using Entity Framework (ver 4.3.1) code-first <p>Here is my solution setup using VS 2012 Ultimate:</p> <p>I have a project (e.g. MyDomainModel) containing all the business domain types using POCO classes. I have another project (e.g. MyEntity) referring to the MyDomainModel project and has the derived DbContext class (e.g. MyDbContext) implementing custom business logic (e.g. for automatic time-stamping when inserting and modifying data) in the SaveChanges method.</p> <p>I have another mstest based project (e.g. MyEntity_Tests) which will test the derived DbContext (e.g. MyDbContext) with known seeded data as part of the database initialization.</p> <p>My problem is that when debugging the test, the breakpoint set on the MyDbContext's c# code is not hit. However if I put lines such as Debug.Print("xxx") in the file and debugging the same test, the test output will contain those expected output "xxx". </p> <p>I know that Entity Framework runtime will generate proxy dll behind scene to wrap those dlls (e.g. MyDomainModel.dll). However not being able to debug my own code as in MyDbContext is really a big problem to me. Do other people have the similar problem when using EF code-first and how to solve this problem?</p>