Debugging Videos or Camera in WP7

16 03 2011

I’ve today made good progress in the project I’m dedicated to. I amongst other things included a small video clip as a part of the application. As many of you know, video clips are fairly easy to handle in Silverlight. In XAML, it can be as easy as this:

<MediaElement Source="/Videos/MyVideo.wmv" AutoPlay="False"/>

When debugging though, the damned thing refused to work for me. I soon found out this was because of the method of debugging I was using. Here are the tree primary ways of debugging a WP7 application:

1. No phone, debug in emulator.

2. Phone tethered, debug in phone connected to visual studio.

3. Phone disconnected, code pre-deployed running on phone.

It turns out Media Elements will only display when in debug mode 3. Otherwise you’ll just see black or the first frame. This is also true for any camera functionality. If you have issues with your CameraCaptureTasks, try using debug mode 3.


Developer tip #23




One response

8 04 2011
Some questions and remarks regarding Windows Phone 7 - Robin Paardekam

[…] emulator. Just found out that you'll need to deploy to an actual device to be able to debug: Think it's about time to get that Developer access now as you'll need that to deploy to a […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: