Everyone knows that it is safer to run as a limited user rather than as the administrator. Because of that, I am often asked if it is possible to debug NetCF applications without being an administrator. The answer? One word. Yes!
Typically, I build to my Pocket PC device, connected to my PC via ActiveSync. When targetting this device, I can build, deploy and debug with ease. Everything works as expected: breakpoints, stepping, viewing locals, the watch window, everything.
What about the emulator?When I installed my copy of Visual Studio .NET 2003, I was logged into my machine's administrator account. When I ran it the first time, I was logged in as a limited user. I loaded my project, made sure it compliled and attempted to deploy to the Pocket PC 2002 emulator. Instead of the emulator launching, I received the following message:
Microsoft Development EnvironmentEmulator driver installation failed. Most common cause: user does not have administrator permissions.[OK]
Hmmm... I closed the message, logged in as an administrator, changed my limited user account to be an administrator, logged out (of the admin account) and back in (as the previous user). Now I could deploy to the emulator.
Since I prefer to run as a limited user (for all of the reasons folks like Michael Howard advocate), I switched my account back to limited and logged out and back in. Once back as a limited user, I launched Visual Studio .NET 2003, loaded my project, pressed F5 (start with debugging) and selected the Pocket PC 2002 emulator... This time, the emulator launched and I was able to debug my application. Success!
What about the command line debugger?For those who have read my debugger series, you know that I enjoy command line debugging (yeah, I'm a little bit old school). Can I debug NetCF applications using the command line (cordbg) debugger while running as a limited user? You bet! In fact, all of my previous debugger posts were written and tested while running as a limited user.
Oh, one more quick thing... I'm going to be starting my year-end vacation at the end of the week, so I'd like to wish everyone a safe and pleasant holiday season and a very happy new year!
Take care,-- DK
Disclaimer(s):This posting is provided "AS IS" with no warranties, and confers no rights.