在调试Azure项目时,Visual Studio 2012调试器突然停止

时间:2013-03-26 08:51:25

标签: visual-studio debugging azure visual-studio-2012 visual-studio-debugging

当我在本地调试我的Azure项目(1个Web + 1 Worker角色实例)时,调试器通常会停止并且角色实例正在重新启动。

我不知道为什么会发生这种情况,没有未捕获的异常,如果我在没有设置断点的情况下运行项目,一切正常。 但是,当我使用Step Over / Step into设置断点并遍历代码时,调试器会以随机间隔停止。

有没有人知道是什么导致了这个/我在哪里可以找到可能对此有所了解的其他日志?

更新

要么我之前忽略了它,要么没有记录到输出窗口,但我现在收到以下错误:

First-chance exception at 0x000007fde4a4167f in WaWorkerHost.exe: 0xC0000005: Access violation reading location 0xfffffffffffffff8.
The Common Language Runtime cannot stop at this exception. Common causes include: incorrect COM interop marshalling, and memory corruption. To investigate further, using native-only debugging.

我很确定这不是我的应用程序的错 - 正如我所提到的,当我没有设置断点并手动逐步执行时,我调试的确切代码运行正常。

有什么想法吗?

更新2

Frome Bootstrapper(旧)日志:

[00012264:00001260, 2013/03/26, 11:37:19.777, 00100000] <- CRuntimeClient::OnRoleStatusCallback(0x0000006BD7718C00) =0x800706be
[00012264:00008432, 2013/03/26, 11:37:19.804, 00100000] <- CRuntimeAgent::RemoveEndpointRegistration(0x0000006BD76F60E0) =0x80070005
[00012264:00001260, 2013/03/26, 11:37:19.811, 00040000] Client process WaWorkerHost.exe is the role host.
[00012264:00008432, 2013/03/26, 11:37:19.830, 00100000] <- CRuntimeAgent::UnregisterEndpoint(0x0000006BD76F60E0) =0x80070005
[00012264:00001260, 2013/03/26, 11:37:19.830, 00080000] Failed to contact the role host process. Treat role as unhealthy.

文件以此结束 - 在下一个引导程序日志中,正在记录角色实例的启动。 可能是调试阻止了引导程序联系角色,从而决定它们是不健康的并且必须重新启动?

上次更新:

我擦拭了我的项目并从存储库中进行了新的检查。事实证明,我的一个类库中缺少引用。丢失的引用从未显示为编译错误,据说是因为某个地方存在旧版本。

对于发现自己处于类似情况的所有其他人,我只建议尝试执行相同操作:完全清理其代码库并查看问题是否消失。在我搜索的所有日志中,我从未遇到过“MissingReferenceException” - 今天会为我节省很多时间

1 个答案:

答案 0 :(得分:2)

Enable Diagnostics in Windows Azure

更新1

您可以尝试启用日志

转到%USERPROFILE%\ AppData \ Local \ DevelopmentStorage 目录。你会看到两个文件 enter image description here

打开文件 DevelopmentStorage.201210.config 并将 LoggingEnabled 更改为true。

enter image description here

参考文献:

Windows Azure worker role crashing WaWorkerHost.exe crashes role

更新2

WaHostBootstrapper 日志位于 C:\ Resources \ Directory \ DeploymentID.Role.DiagnosticStore \ WaHostBootstrapper.log

其他日志:

<强> WaWebHost C:\资源\ TEMP \ Guid.Role \ RoleTemp \ WaWebHost.log

<强> WaIISHost C:\资源\ TEMP \ DeploymentID.Role \ RoleTemp \ WaIISHost.log

<强> IISConfigurator C:\资源\ TEMP \ DeploymentID.Role \ RoleTemp \ IISConfigurator.log

IIS日志 C:\资源\目录\ Guid.Role.DiagnosticStore \ LogFiles文件\ W3SVC1

Windows事件日志 d:\ Windows \ System32下\ Winevt \日志

更新3

在Azure应用程序中定义本地存储会创建一个新文件夹,因此Azure计算模拟器的路径为%USERPROFILE%\ AppData \ Local \ dftmp \

相关问题