views:

174

answers:

2

I have VS08sp1, Gallio 3.0.6.763 and TestDriven.NET 2.14. I use MBUnit framework for unit tests. When using TestDriven's Test With > Debugger, I am able to step into the code. However, I am unable to "Edit and Continue", despite this option being turned on in VS options. I get the following error message:

changes are not allowed when the debugger has been attached to an already running process

The project that is being unit tested is a windows class library and I can "Edit and continue" while running the library through the regular debugger. I would appreciate any help with getting "edit and continue" to work.

Thanks!

+1  A: 

I don't think you will be able to make this work with TestDriven.Net unless Jamie changes how the ProcessInvoker.exe process gets launched so that Edit & Continue support will work.

To be honest, I always turn off Edit & Continue because it has so many limitations as to be practically useless to me. Instead I rely on the Visual Studio Immediate Window to experiment with the running application and prototype bug-fixes.

Another advantage of turning off Edit & Continue along with "Require source files to exactly match the original version" is that the debugger will no longer lock the source files. This is particularly handy since I might fix two or three bugs in one session and it sucks to have to stop the debugger in order to edit files. Also, it appears that Visual Studio spends a rather large amount of time redrawing the tabs as it changes the "locked" status on or off - particularly if there are many open tabs. I have observed pauses of several seconds before and after debugging as a direct consequence of the locking. Consequently turning off all features that cause locking provides a noticeable speed up.

So I guess my advice is to try a different approach to debugging your tests that does not require Edit & Continue.

Jeff Brown
A: 

From http://www.testdriven.net/downloads/releasenotes.html:

705: Add (hidden) support for 'Test With... E&C'

To enable 'Test With... Debugger (E&C)' that works with Edit & Continue; edit the 'TestDriven.dll.config' file and uncomment . This test runner may 'touch' project files when used with source control (this is why it's disabled by default).

isamux