Windows phone debugging in device - debugging

I am a windows phone app developer. My PC do not have enough graphics to support windows phone emulator. So I am developing application by using the windows phone device (HTC HD7) for debugging and testing from almost 5 months now. Now my device is so hanging and switch-off automatically sometimes. Is it bad for the device to use the developing purpose rather than using emulator ?. Is my device have problem because of the continuous use for developing ?

I think it is not a problem in using device for the developing purpose.

Looks like a fault in the device - I'd send it in for repair. I've certainly not heard of debugging causing issues with devices.

Do check if your internal storage is about getting full. Also if you have minimum RAM config, try not using multiple apps while debugging. Probably this should help.
And nonetheless, you can just visit a technician and get your phone thoroughly checked for issues.

Related

Windows phone emulator

I want to develop app for windows phone but I got a big problem, my laptop can't run the emulator, after checking the requirements I know that my vga driver doesn't support it. My question is, are there any alternative for windows phone emulator instead of the officially one from Microsoft? Or any other way to tweak it to be run on my laptop? Thanks
From my understanding there isn't any other windows phone emulators. If you can get a hold of a windows phone 7 it would be possible to test on that. You can try to contact a Microsoft windows phone evangelist in your area, the one in my area helped me get a phone to test on.
I am not sure about tweakinging your laptop to get the emulator to work. Is your vga driver up to date? If not maybe try to update it. I know it takes quite a bit of computer power to run the emulator smoothly.
If you wanted you can try to register for a virtual lab, here you remote into a windows machine and are able to build and test on the remote machine, but it is time limted and is usually for a class to learn about it. https://msevents.microsoft.com/CUI/EventDetail.aspx?culture=en-US&EventID=1032485600&amp%3bculture=en-US

Can I still manage to develop on Windows Phone even with limited hardware on a development machine?

I have been long interested to develop on the platform. I even got the tools installed already on my desktop but I can't upgrade my WDDM from 1.0 to 1.1. To make things simple: my graphics chips are not up to the task of running the emulator.
If I still buy a Windows Phone (e.g. a Nokia Lumia) for development purposes, can I sideload and test my apps there efficiently instead of going against the emulator?
If I still buy a Windows Phone (e.g. a Nokia Lumia) for development purposes, can I sideload and test my apps there efficiently instead of going against the emulator
Yes, of course. It's very easy and convenient. You have debugger and all the goodies. Advantage of the emulator is the test option for 256MB devices.
That's exactly what I used to do prior to upgrading my devstation. The nominal min spec says 3G but with a real phone it worked fine in 2G and as you say this also sorts out graphics limitations.
Note that the setting for whether the emulator or physical device is used is stored in the project, so if you accept a project from someone else you will have to set it once prior to debugging.
Well there are 2 sides of the coin. With the physical device you can test most of the things, but with a few limitations
You will not be able to test internet related test cases - For example, if you have an app which uses internet connectivity then you will not be able to test it on the device easily because
The device does not use the machine internet connectivity
When connected to the PC the device's internet connectivity(Data connection 3G/ wifi/GPRS) is broken.
You will have to purchase an account right from the first day you want to test your app. If you have the emulator working then you could postpone this for atleast few days.

Windows Phone - Application crashes when disconnected from PC

Whenever I disconnect my Windows Phone from PC (connected through USB) and if my application is running, my application hangs for sometime and then application crashes.
Does anyone experienced same behavior? I guess switching for PC connection to Wi-Fi/GPRS is causing the issue.
the windows Phone Requires that you Safely Remove hardware first, after a few times when i started Development on the windows phone i did the same and Ended up getting a new Phone. So plainly put, try to Safely Remove and Make sure it is installing the app to the Device.
Meaning if you Remove the phone, the App is still able to be ran just like a normal downloaded App form the Market place.
if you want more in depth information, i would suggest Reading the WP7 Everything Programming ebook lol
its filled with good information, and Definitely Helped me along my road to Love DEV for WP7.
As gamernb says, if you disconnect the USB from a properly tethered Windows Phone (i.e. connected to Zune, or using the WPConnect utility), the phone's network connection will be reset and your app's connections will be terminated. The phone will then start trying to connect using WiFi or cellular data (if they are on), but this can take quite a while.
You will have to handle this network disconnection in your app - I've found that pulling the USB cable in this way is a good ad-hoc test for WP7 apps: do an action which you know will use the network connection. Then watch if the app crashes, or handles this gracefully.
Actually you aren't guaranteed to always use the PC data connection: if you make sure that the computer has no data connection (i.e. pull the Ethernet cable, turn off WiFi etc ), the WP7 app can then use cellular data or WiFi on the phone instead.
Alas-
you could set perimeters in your application to Check what the connection type is, then Make changes accordingly.
You May have a slight freeze, but that's better then a crash....mainly when the phone switches from PC to WWAN, their would be a slight Pause.
use the Reachability Class and NSLog to Figure out whats going on exactly.
I really hope that helps!

desktop app (windows app) connect windows phone

is there a assembly or API to get isolated storage in windows phone using WPF or win form while connecting the windows phone device via USB?
please note the devise will be running offline so cannot use web service or WCF
thanks
Check out this article on emulator automation. It includes details of adding and removing files from isolated storage and should also work on an actual device as well as the emulator.
This isn't really a supported activity. I too have been thinking about what to do when you want a desktop version with extended features and you want the two to share data.
I think the key here is to think about how Microsoft achieves this with email and calendaring. There's no shared filesystem, rather Outlook on the desktop and Outlook on the phone both function as clients for the same Exchange server.
At one point I considered running a webservice in a desktop app so that the phone app could push data to the desktop app, but that would be a very manual process. The common-server model will provide a much better UX.
It's not an exact match to your situation, but a good tool is the Windows Phone 7 IsolatedStorage Explorer.
The reason I say it may not be the best match is this note from the documentation:
The WP7 Isolated Storage Explorer
supports connections from the emulator
or actual devices. For applications
running on devices a data connection
must be enabled (WiFi or the mobile
data connection).
It's at least a great start and keeps you from having to do the heavy lifting. Is there any reason you have to be offline and check the contents of IsolatedStorage? If you elaborate on why you have that requirement, we might be able to offer some work arounds.

Windows Phone 7 - OutOfMemory Exception in emulator but not on device

At the point in my app where I load a lot of textures, I get an OutOfMemory Exception when I debug on the emulator but on the device, it works!
This is a big problem for me because I share a device with another developer and now that we have this problem, we can't both test at our own time with the emulator when the other is using the device.
Anyone know what could be the problem?
(its a game I'm working on in XNA by the way)
If you are using the new emulator from the Beta Mango SDK - that's it. We've had memory leaks, crashes, etc. You can attach a piece of code that shows the memory usage -> http://blogs.msdn.com/b/mikeormond/archive/2010/12/16/monitoring-memory-usage-on-windows-phone-7.aspx it's for silverlight, but with a bit of work you can convert it to xna.

Resources