How do I attach to an app running inside the Windows Phone emulator? - visual-studio-2010

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 an error:
"Unable to connect to 'Windows Phone 7 Emulator'. Not implemented"
What am I missing?

As a workaround:
open the solution configuration manager
next to build is a deploy column, uncheck your project
press F5
This will launch the app that is already on the device without overwriting it (and deleting its storage).

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.

Related

Deploying UWP app from Visual Studio to Windows 10 Phone requires PIN

I'm developing a UWP app for Windows 10 Phone. Since some days when I try to deploy the app from within Visual Studio I get asked for a PIN in order to connect to the device
In the phone settings I can trigger pairing so a new PIN is generated for me. But when I enter that PIN, a new dialog appears telling that the PIN was wrong:
If I press 'Cancel' then the deployment is interrupted with an error message:
1>Error : DEP6100 : The following unexpected error occurred during bootstrapping stage 'Connecting to the device '30F105C9-681E-420b-A277-7C086EAD8A4E'.':
It's strange but some days ago I was not asked for the PIN when I deployed the app. :-( So currently the only option I have is deploy via the web portal. This works but it's enormously slow :-(
Can someone tell me how to solve the problem or what PIN should I enter in order to achieve the deployment?
I had this problem today, closing visual studio and restarting IpOverUSB service fixed this issue for me.
You might want to take a look at Ricardo Pieper Question he has listed all the things he tried to do and all the things that might work.
It looks like the problem was caused by the fact that I'm developing inside a virtual machine (VMWare Fusion on Mac). After setting up the development ebvironment on a PC the deployment works fine.
I can even debug the app running on the phone from inside Visual Studio.
Here's a solution which worked for me:
I had the same problem on my Macbook running VMWare Fusion and trying to debug on my Lumia 950 phone. I was nearly giving up, then I tried using the free VirtualBox and with a virtual USB 3.0 port (which requires the VB extension pack). And it worked!!
Here's my setup:
VirtualBox 5.0.14
VB Extension Pack
Win 10 Development VM from Microsoft – the VirtualBox variant, Build 201601: https://dev.windows.com/en-us/downloads/virtual-machines
Lumia 950 with Windows 10 Mobile 10.0.10586.29
In the VM, I configured to use the USB 3.0 port, since with USB 1.x the phone device driver could not be installed by Windows 10.
The VM contains Visual Studio 2015; I created a UWP JavaScript application and ran it with "Debug" on the connected Lumia device.
Had to go to the Developer options on the device.
Switch back to "Windows Store Apps" option, and then back to "Developer Mode"

Windows phone emulator not being started

I am facing a strange issue with Windows Phone Emulators for last a few days. When I try to run any windows phone application from Visual Studio 2013/2012, it initially starts the emulator and then stops with an error displayed in the error window inside visual studio:
Error : DEP6100 : The following unexpected error occurred during boostrapping stage 'Connecting to the device':
SmartDeviceException - App deployment failed. Please try again.
I have been trying many solutions in order to fix this issue but nothing helped. At last I re-installed the whole windows 8.1 and then visual studio 2013. Then I created a windows phone 8 application and run it smoothly in windows phone emulator.
Then I installed all windows updates including windows 8.1 update 1. After that I installed the visual studio 2013 update 2. Now if I run any new/existing windows phone 8/8.1 project I get the same error again. Seems like there is something wrong with windows 8.1 updates or visual studio 2013 update 2.
Any help?
Open network and sharing center
Change adapter settings
Check if vEthernet [Windows phone emulator internal switch is enabled)
Try deploying it to the emulator now
If above does not work
Delete the virtual switch(s) if any and do a deployment
If it still does not work, connect to the internet via a LAN
Keep you’r wifi on
do a deployment to the emulator
Most cases above method worked !
I had the same error when i tried switching the target OS version of my app from Windows Phone 8 to 8.1. With 8.1 you get a new manifest file and if, for app or publisher identification string, you have different values in one manifest file than in the other, it will output that exact error when trying to start the app in the emulator. However after searching the web back when i had that error, this error seems to have quite a bunch of possible sources, this being only one among many other, but be sure to check it.
Uninstalling the symantec antivirus fixed my issue.

How to run apps in Visual Studio Express for Windows Phone 8

Hi there i am a windows phone developer, I am unable to run my apps in the emulator, and it says to run the apps on a physical device. Can anyone help me with that because when I develop the apps in the express blend 2012 the windows phone 7 emulator opens up.
Plz help me in running my apps in the wp8 emulator in the visual studio.
You need to change the target from device to emulator in the start debugging button.
As #deeiip said, check whether the target is correctly set.
Else, you need to check if you have a hardware support of the SLAT. That is mandetory for running an emulator. Hyper-V needs that.
If that's not there, you won't be able to run an emulator ever.
you are needed to check Your System Configuration that it is as per the Requirements of Windows phone 8 Devlopment
For More information Check here

WP 8.1 - Debug Universal App in device not working with VS 2013

im trying to ebug my universal app from VS 2013 update 2 in my WP8.1 device but i have this error:
Failed to deploy. Make sure another deployment or debugging session is
not in progress for the same emulator or device from a different
instance of Visual Studio: Error writing file
'%FOLDERID_SharedData%\PhoneTools\11.0\Debugger\bin\RemoteDebugger\msvsmon.exe'. Error 0x80070005: Access Denied.
I tried run as administrator and got the same error. Im using VS 2013 Update 1+2, Windows Phone 8.1 on my device (unlocked with WP8.1 developer tool).
Thanks in advance!
Usually, this error means there's a pending Windows Phone OS update. Can you see if you have pending updates on the phone and restart?
In the remote case that still doesn't work, you can try reset the phone in about page to get the phone to a clean state.
http://www.windowsphone.com/en-US/how-to/wp8/basics/reset-my-phone
Probably you installed the app before and then changed some settings in you AppManifest like the project-ID. Uninstall the previously installed version from your device or change the ID-settings back to what you used for the previous installation.

Debugging Win Mobile 6 App with Visual Studio 2008

When I go in to debug the app, it asks me to choose where I would like to deploy it. When I select Windows Mobile 6.5.3 Professional Emulator and click the Deploy button, it starts to work and throws up a command line and then it goes away and Visual Studio doesn't appear to be in debug mode.
I have the Device Emulator open, Windows Mobile 6.5.3 Professional Emulator loaded and cradled. Can someone help me figure out why it will not let me debug this project?
Brad, I downloaded the code and just unpacked the zip to D:\boxoffice_mobile (a local drive partition). Then I started VisualStudio 2008 and opened the solution file. I get a warning message that the project is not loaded from a trusted location (http://msdn.microsoft.com/en-us/library/bs2bkwxc%28v=vs.80%29.aspx). As I do not use a network drive, I ignored the warning two times and the projects load all fine.
BTW: I found a great tool to manage these 'security' warnings: http://blog.codingoutloud.com/2010/03/05/the-project-location-is-not-trusted-dealing-with-the-dreaded-unblock/. The message had nothing to do with a remote file access.
Then I just looked at the solution configuration to ensure that only the needed projects are build and did no change, as only BoxOfficeMobile and WebserviceTest are set to build and only BoxOfficeMobile is set to deploy.
Then closed solution configuration manager and just pressed F5 to start debugging to see what happens.
The startup project BoxOfficeMobile was build and deployed to "Windows Mobile 6.5.3 Professional Emulator". The emulator started and the files were deployed and the project was stopped by a breakpoint inside the code:
Here is another screen shot with the emulator set to 'Display: Always on top':
So, as you can see, the project is fine and the debug issue on your site is caused by a different setup.
Do you load the project from a network drive share? Try moving it to a local drive and run it from there.
Did you change Device settings in the VS2008 Tools:Options menu? Here is my setup (as coming as default, I did not change anything):
and the details:
The additional settings available via the buttons are empty (Configure) or unchanged (Emulator Options).
I am very interested in seeing what you changed to be not able to debug the project.
before you start developing for Windows Mobile 6.5 Prof, you need to setup your development environment.
First, install Visual Studio 2008 (no express version)
Download and install either ActiveSync (host OS <= Windows XP) or Windows Mobile Device Center / WMDC (Windows Vista/7)
[optional] Download and install Device Emulator Manager
Then download and install Windows Mobile 6.5 DTK (http://www.microsoft.com/en-us/download/details.aspx?id=5389)
Now, you can start a new C# project inside Visual Studio 2008:
Follow the wizard:
The list of Target Platforms depend on the Mobile/CE SDKs you have installed!
Select either .Net Compact Framework 2.0 or 3.5. The choose depends on what is installed on your PC and what is available on the device. If the device comes with 2.0 pre-installed, I would choose 2.0 except for I need something only available in 3.5 (ie Mobile.Status namespace).
Now you get an empty form:
You can change the target device in the project properties:
If you want to change the target platform, look at "Change Target Platform" in Project menu or just right click the project in solution explorer and select Change Target Platform:
The above has nothing to do with Device Emulator Manager or the installed Emulator Images!
You can run a WM5 targeting project on a Windows Mobile 6.5 device if you want.
To start debugging and SmartDevice application inside an emulator. Just Select an Emulator entry from the target device list in Project properties or just in the SmartDevice toolbar. Then click Debug and "Start Debugging". VS will start an emulator with the specified emulator image and deploys your project application files and start remote devugging.
You may also start an emulator image using DeviceEmulatorManager and then cradle the running Emulator image. To use the running and cradled (ActiveSync or WMDC connected!) emulator do NOT select an emulator inside VS but a Device. VS does not see the difference and uses the WMDC connected device, regardless of being an emulator or real device.
VS uses DMA to communicate with the emulator, not USB or Serial as with a real device.
Now start your development.
First of all clean your project.Then freshly start the emulator.Right click the project and select build.Then Debug the project.Your project will be started in Emulator (Don't Open the application from your Emulator at this time).
Just check your Emulator Start>File Explorer>My Device>Program Files whether the project has been previously installed.If so uninstall from the Settings> System > Remove Programs. And try re-building application and deploy it.

Resources