Here’s a quick one that’ll save you a lot of time and trouble if you’re not already aware of it.

One of the coolest features of Visual Studio is that you can launch a debug run of a phone application on a phone rather than in the emulator. Since the emulator can’t emulate everything, sometimes it’s absolutely essential to step through your code as it executes on a real device.

However, some parts of the Silverlight for Windows Phone API can’t execute when your phone’s connected to your PC via the Zune client. For example, the Zune client prevents applications running on a phone from accessing the phone’s media library – meaning, among other things, you can’t test a photo chooser that lets the user select pictures from the pictures library, or an app that uses the XNA framework to play songs from the music library. You can disconnect the phone and access these resources just fine. But once you disconnect, you’re no longer connected to the debugger on your PC.

A solution arrived in the Windows Phone Developer Tools October 2010 Update last year. That solution is a command-line tool named WPConnect.exe, which lets Visual Studio connect to your phone without running the Zune client. You still have to install the Zune client, but rather than launch it to connect to your phone, you can launch WPConnect instead:


You’ll find it in the Program FilesMicrosoft SDKsWindows Phonev7.0ToolsWPConnect directory, and once you find it, you won’t be able to do without it. When you’re connected with WPConnect, you can access the media library or anything else that the Zune client doesn’t allow. Debugging without restrictions is the best kind of debugging there is!