如何调试应用程序挂在Windows Phone 8.1 [英] How to debug app hanging on Windows Phone 8.1

查看:177
本文介绍了如何调试应用程序挂在Windows Phone 8.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一款Windows Phone 8.1的应用。

I am developing a Windows Phone 8.1 Application.

我的应用程序完全挂在发射和不动/滚动的用户输入。不过,如果我强行关闭我的应用程序,然后重新打开,它似乎很好地工作。

My app completely hangs on launch and doesn't move/scroll on user input. However, if I force close my app and re-open, it seems to work fine.

所以,有2个结果,这两个有时会发生,但不一致

So there are 2 outcomes, both happens sometimes, but inconsistently


  1. 的应用程序完全挂起,忽略所有的用户输入

  2. 的应用程序正常工作

当检查我观察到,当所述第一情况下发生,我的输出窗口显示一系列线程退出的如下所示

While checking the output window I observed that when the first scenario occurs, my output window displays a series of thread exits as shown below

The thread 0x680 has exited with code 259 (0x103).
The thread 0x780 has exited with code 259 (0x103).
The thread 0xc5c has exited with code 259 (0x103).
The thread 0x9a0 has exited with code 259 (0x103).
The thread 0xc90 has exited with code 259 (0x103).
The thread 0x4f4 has exited with code 0 (0x0).
The thread 0x2f4 has exited with code 0 (0x0).

然而,在第二个方案中,当应用程序正常工作,我没有看到这些线程退出。

However, in the second scenario when the app works fine, I don't see these thread exits.

这使我觉得这可能会发生,因为一些线程被滞留在无限循环。

This has made me to feel that this could be happening because of some threads being stuck in infinite loop.

除此之外,我没有看到,可能会造成这个问题的任何例外

Apart from this, I don't see any exceptions that could be causing this issue

我也看看和<一个href=\"http://stackoverflow.com/questions/22395396/why-am-i-seeing-multiple-the-thread-0x22c8-has-exited-with-$c$c-259-0x103-m\">this链接。但它并没有说如何解决这些类型的问题。

I did have a look at this and this links. But it doesn't say how to fix these type of issues.

我如何调试这些类型的问题。这使得用户界面问题完全挂起。

How do I debug these type of issues. Issues that makes the UI hang completely.

我会很感激,如果有人能在正确的方向指向我。

I would be very grateful if someone can point me in the right direction.

推荐答案

在除了获得一个最小的摄制弗雷德上述建议,尝试将在调试 - >例外... 菜单,使时抛出为所有这些,看看什么有趣弹起(注:你经常会从Windows中第一次良性机会异常,所以采取与一粒盐)。

In addition to getting a minimal repro as Fred suggests above, try going to the Debug -> Exceptions... menu and enabling Thrown for all of them to see if anything interesting pops up (note: you often get benign 1st-chance exceptions from inside Windows, so take with a grain of salt).

当应用程序处于挂起状态打暂停按钮在VS,并期待在调试 - >窗口 - > <一个href=\"https://msdn.microsoft.com/query/dev12.query?appId=Dev12IDEF1&l=EN-US&k=k(vs.debug.parallelstacks);k(SolutionItemsProject);k(TargetFrameworkMoniker-.NETCore,Version%3Dv4.5.1)&rd=true\"相对=nofollow>并行任务 窗口,看看你能确定是什么等待着。

When the app is in the hung state hit the Pause button in VS and look at the Debug -> Windows -> Parallel Tasks window to see if you can determine what is waiting.

最后,考虑加入的Debug.WriteLine 在你的应用程序调用的不同点(在应用的构造函数,只要您开始下载,只要你完成下载等),看看是否有您的code的执行。

Finally, consider adding Debug.WriteLine calls at various points in your app (in the App constructor, whenever you start a download, whenever you complete a download, etc.) to see if any of your code is executed.

这篇关于如何调试应用程序挂在Windows Phone 8.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆