Blog

Silverlight for Windows Phone Programming Tip #4

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!

Jeff Prosise

View Comments

Recent Posts

8-Step AWS to Microsoft Azure Migration Strategy

Microsoft Azure and Amazon Web Services (AWS) are two of the most popular cloud platforms.…

4 days ago

How to Navigate Azure Governance

 Cloud management is difficult to do manually, especially if you work with multiple cloud…

2 weeks ago

Why Azure’s Scalability is Your Key to Business Growth & Efficiency

Azure’s scalable infrastructure is often cited as one of the primary reasons why it's the…

4 weeks ago

Unlocking the Power of AI in your Software Development Life Cycle (SDLC)

https://www.youtube.com/watch?v=wDzCN0d8SeA Watch our "Unlocking the Power of AI in your Software Development Life Cycle (SDLC)"…

1 month ago

The Role of FinOps in Accelerating Business Innovation

FinOps is a strategic approach to managing cloud costs. It combines financial management best practices…

1 month ago

Azure Kubernetes Security Best Practices

Using Kubernetes with Azure combines the power of Kubernetes container orchestration and the cloud capabilities…

2 months ago