How can I debug a CE app on the device?

泄露秘密 提交于 2019-12-12 02:25:24

问题


I asked a similar, but not identical, question here

My Windows CE app won't even start up on the handheld device (an old version of it does, but not the new version).

It builds, copies over, but just refuses to run; it "flashes" when I 2-click it, but that's it. No err msg, just won't budge.

I added a global exception handler in hopes it would catch the problem and give me a glimpse into it with this code:

public static int Main(string [] args)
{
    try
    {
        // A home-brewed exception handler (named ExceptionHandler()) is already 
defined, but I'm adding a global
        // one for UNHANDLED exceptions (ExceptionHandler() is explicitly called throughout the code in catch blocks).
        AppDomain currentDomain = AppDomain.CurrentDomain;
        currentDomain.UnhandledException += new UnhandledExceptionEventHandler(GlobalExceptionHandler);

        . . .

        // Instantiate a new instance of Form1.
        frmCentral f1 = new frmCentral();
        f1.Height = devIn.GetScreenHeight(); 
        f1.Text = SSCS.GetFormTitle("The Return of Sancho Panza", "", "");

        Application.Run(f1);

        devIn.Close();

        Application.Exit();
        return 0;
    }
    catch(Exception ex)
    {
        SSCS.ExceptionHandler(ex, "Main");
        return 0;
    }
} 

static void GlobalExceptionHandler(object sender, UnhandledExceptionEventArgs args)
{
    Exception e = (Exception)args.ExceptionObject;
    MessageBox.Show(string.Format("GlobalExceptionHandler caught {0}", e.Message));
}

...but still no go; there is nary a peep to be heard from the little guy.

Is there anything I can do to find out what is happening / why the little beast refuses to respond to its wakeup call?

UPDATE

Could the problem be related to this, and if so, how to solve it?

The circumstance that both the updated version of this existing app AND a brand new and simple app refuse to run indicate there is something fundamentally flawed somewhere in the coding, building, or deployment process.

来源:https://stackoverflow.com/questions/23253366/how-can-i-debug-a-ce-app-on-the-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!