views:

32

answers:

2

I'm trying to debug an app running inside the windows phone 7 emulator, but I can't connect to it from visual studio - 'Attach to Process' -> selecting 'Windows Phone 7 Emulator' transport displays a "Unable to connect to 'Windows Phone 7 Emulator'. Not implemented" error. What am I missing?

A: 

I don't think it's possible to connect to an app that is already running on the emulator.

It sounds like you're trying to connect to the emulator directly yourself,rather than the app running in it. Which I don't think is what you want anyway.

It may help if you think of the emulator as a virtual machine. That's what it is. (near enough.)

If you want to debug an app in the emulator, you need to launch it through Visual Studio.

Matt Lacey
I need to connect to a running app as I've run the xap through a .NET postprocessor (similar to postsharp) and it's screwed it up somehow; I need to attach to it to see the exception being thrown, and I can't run it directly from visual studio as it's been changed from what was originally compiled...
thecoop
Can the postprocessor not be integrated into the VS pipeline? Like PostSharp can. (Or could last time I looked at it.) If not, can you not just add a global exception handler to capture the error and get access to the details that way?
Matt Lacey
I've tried integrating it, but there seems to be something about it that the emulator or deployment doesn't like (a very helpful 'Parameter is incorrect' message...
thecoop
May be that the post-processor doesn't like WP7. I'm not sure what to suggest apart from stripping back to minimum code to reproduce and then reflecting on the pos-processor code to see if you can identify the problem that way.
Matt Lacey
A: 

Is there any way to trick VS into deploy+debug of the xap after you've modified it? or does that force a new build that overwrites your changes?

Otherwise, from what i've found, attaching to an already running app is "not supported"...

John Gardner