簡體   English   中英

應用程序在調試模式下運行良好,但在代碼中帶有斷點,但在Windows Phone 7.5中正常運行時會產生意外結果

[英]App running fine in debug mode with breakpoints in the code but gives unexpected results while running normally in windows phone 7.5

我遇到一個奇怪的問題,當我的任何代碼行上都有斷點時,我的應用程序運行都很好,但是在啟動時卻沒有任何斷點,則給出了意外的結果。 基本上,我使用的是GeoWatcher來獲取位置,然后獲取該位置的天氣信息。 我還放置了Messagebox來驗證我的所需代碼是否已執行並且可以執行,但是未完成應執行的功能。 這是需要針對我的情況執行的代碼,但在正常模式下無法正確執行。

     Dispatcher.BeginInvoke(new Action(() =>
                                {
                                    IsolatedStorageSettings.ApplicationSettings["CurrentLocationAdded"] = true;
                                    obj.Start();
                                    RetrieveFormatedAddress(obj.Position.Location.Latitude.ToString(), obj.Position.Location.Longitude.ToString());
                                }));

希望有人能幫助我解決這個問題。 我會很感激。

嘗試這個 :

    Dispatcher.BeginInvoke(() =>
    {
        IsolatedStorageSettings.ApplicationSettings["CurrentLocationAdded"] = true;
        obj.Start();
        RetrieveFormatedAddress(obj.Position.Location.Latitude.ToString(), obj.Position.Location.Longitude.ToString());
    });

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM