I am not sure if this is me doing something stupid or just up against the bleeding edge.. I am developing a simple Cordova app but that is academic since I can repeat this issue with the standard 'Wizzard produced' default application.
I had the app working and debugging fine with VS2013 using both Ripple and occasionally with a real device. I don't have permanent access to the device so I thought Id try the new VS2015 CTP5 with emulator. So far so good. All builds ok and the app does get deployed to the emulator, and starts. However, VS is stuck in the 'deploying' process and never comes out. To the extent that I have to 'ctrl-Break' out of it. and the debugger never starts.. The last few lines of the build output are:
2> Built the following apk(s):
2> C:\Users\Brett\Documents\VisualStudioCordova\Projects\mblapp\mblapp\bld\Debug\platforms\android\ant-build\CordovaApp-debug.apk
2> Using apk: `C:\Users\Brett\Documents\VisualStudioCordova\Projects\mblapp\mblapp\bld\Debug\platforms`\android\ant-build\CordovaApp-debug.apk
2> Installing app on device...
2> Launching application...
2> LAUNCH SUCCESS
2> Command finished with error code 0: `C:\Users\Brett\Documents\VisualStudioCordova\Projects\mblapp\mblapp\bld\Debug\platforms`\android\cordova\run.bat --nobuild,--target=169.254.138.177:5555,--debug
2>
So there is an error there but I really don't get what it means..
Ok, So I went back to VS2013 but now the 2015 install has changed something and using Ripple it now breaks out of the code at unexpected places in the code.. not breakpoints.. and the javascript console says 'Paused at breakpoint' in its dropdown. I cant access the 2015 Emulator directly, but out of interest I left the emulator running after 2015 was closed and CAN connect AND debug using VS 2013.. great.. but its not a great way to start debugging..
I really like the look of the new Emulator and it does seem to work great with 2013.. so does anyone out there know how to make VS2013 deploy to the new emulator? .. I tried running it and did have some success. But I cant find where VS2015 has hidden its VHD file..
Or, does anyone know why VS2015 might not be deploying correctly.. Im happy to go with a solution that works.. Just that right now Im stuck not going forward, and its an uninstall 2015 and probable reinstall 2013 to go back... Many thanks.
OK.. Ive posted this as an answer because it does deal with part of it.. and I did struggle a bit so it might help someone else. Running the emulator from VS2013. You need to go to the folder
C:\Program Files (x86)\Microsoft Visual Studio Emulator for Android\1.0
where the emulator is installed. Having run it at least once from VS2015, it had created a file called vsemu.vhd and vsemu.sdcard.vhd. Copy both these files to something similar in the same folder I used 'myemu'. Then to start the emulator I created a simple shortcut with the target property:
"C:\Program Files (x86)\Microsoft Visual Studio Emulator for Android\1.0\XDE.exe" /vhd bretts.vhd /video 1080x1920
this sets the resolution too.. You can find all the startup flags etc by using:
...XDE /?
Im not sure yet, but I think it stored the various app shortcuts in the sdcard file.. although I wouldn't swear to it. Ill repost if something changes there.
Ok Debugging.. I started VS2013 and set the debug target as 'Device'. This worked fine.. so far.
Id still love to know why 2015 is not deploying properly though, for now I'll just assume its the 'bleeding' part of the bleeding edge. Cheers
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments