vs2008 emulator detection (3 questions)

L Laurie Borlase 3 years 6 months ago
10 2 0

Hello

I am debugging a Visual Basic (VS2008) RFID and Barcode application using the emulator or debugging on the actual MC3190Z device.. 
I added a public boolean called mbEmulator and set it to true or false and use this to bypass the RFID and Barcode connect logic in the program..

1) Is there a method in VS2008 to determine whether the program is running in debug mode?
2) Is there a method to determine if the debugging is on the emulator or the device?
3) I am using the Windows Mobile 6.5.3 Professional Square QVGA Emulator.  Is this the best emulator for testing MC3190Z applications?

Please Register or Login to post a reply

2 Replies

Y Yanis Dalabiras

I would suggest that you really want to be running on a device if possible.  Emulators become less and less useful the more hardware features you use in your app.  You also want to be sure you are not building an app that works great in the emulator, but not so great on a real device with limited resources, sometimes goes to sleep, loses connectivity, has a small touch screen vs a mouse, limited keyboard, etc.

During the development process, many developers will deploy to an actual device sitting in a cradle, and maybe use something like mymobiler or activesync remote control to interact with the device from the PC if that is desired.  But again, you want to try to run the app on the real device in a more real situation (disconnected from a PC) every now and then to be sure the usability and error recovery in a real world environment are as needed.

1.  I found this, and it seems to work.  It will tell you if the debugger is attached.  If(System.Diagnostics.Debugger.IsAttached) ...
debugging - C# if/then directives for debug vs release - Stack Overflow

2. Detecting whether you are on a device might be easiest by just looking to see if the \application folder exists.  All Symbol based WM and CE (MCXXXX) devices will have this folder.  Or you could do the below.  There is also an example of this in the EMDK Sample app VB_SysInfoSample1.
Platform detection I: How to detect that your app is running in the emulator - .NET Compact Framework Team - Site Home -…

3.  That seems like the one that would match the device the closest.

K Kutir Mobility

This issue needs assistance from Motorola folks. Lets wait to hear from them.
Thank you.
Kutir Mobility

CONTACT
Can’t find what you’re looking for?