views:

22

answers:

2

Hi

I'm using VS2008 and building a WinForms mobile application targetting the Compact Framework 3.5 and Pocket PC 5. I'm using the VS unit test functionality and the tests run OK but won't stop at breakpoints. I keep getting the dreaded "breakpoint will not currently be hit, no symbols have been loaded for this document" message. The solution also includes a server-side WCF service and the tests for that work fine.

I've searched the net and tried every suggestion I can find. About the only thing I've found that seems a little odd is that inside Configuration Manager I'm unable to check the Deploy box for the mobile unit tests project. I don't know if this is a problem or not.

Help!!

Cheers

Mark

PS - It would be nice to actually write code instead of spending most of my time trying to get all these bloody bug-ridden tools and frameworks working :(

UPDATE: I've just found this page which apparently explains how to fix the problem: http://msdn.microsoft.com/en-us/library/bb513875.aspx

There's 2 problems with this:

  1. It's a f***ing joke! Hey Microsoft - how about building ALL the basic functionality required before claiming that we can unit test in the CF! Who wants to spend 10 minutes setting one breakpoint?

  2. It doesn't work. When I try to attach the debugger I get "Unable to attach to the process. Attach is not enabled for this process with this debug type". I give up.

A: 

Clean the solution and do a rebuild (note: not a simple build) of the project. Especially the latter has worked wonders for me, since I've been in the very same situation as yours, and it solved the problem.

Giu
Thanks for the reply Gui but I've tried that 50 times already (along with rebooting, deleting all bin/obj folders etc etc....). Bloody Microsoft grumble grumble :(
Mark Evans
@Mark That's a pity. I've spent quite a lot of time, too when it happened, but the Rebuild did it for me, fortunately. Did you close all the instances of VS (without rebooting the machine), restarted only one with your solution, and then tried to rebuild it?
Giu
Yeah tried all that thanks.
Mark Evans
+1  A: 

Correct, you cannot set break points in CF unit tests (well you can set them, but it will never break). I'm a little surprised that the MSDN workaround din't actually work, but it's still worthless becasue the turnaround time from when you want to debug to when you're at a break point is absolutely ridiculous and untenable.

I have created a workaround which is basically my own test runner, so you don't use the Studio test host. It works well and is published with one of my open source projects. Details can be found in this blog entry.

ctacke
Ctacke to the rescue again! Thanks - I'll check out your solution :)
Mark Evans