简体   繁体   English

无法调试 Service Fabric

[英]Cannot debug Service Fabric

I have a statesless Service Fabric service我有一个无状态的 Service Fabric 服务

I am deploying it within my application into a 1 node dev cluster我正在我的应用程序中将它部署到一个 1 节点开发集群中

None of my breakpoints ever get hit我的断点都没有被击中

I have rebuilt, restarted, updated visual studio and I am now really out of ideas我已经重建、重新启动、更新了 visual studio,现在我真的没有想法了

Has anyone ever seen this?有没有人见过这个?

The strange thing is that my breakpoints stay active奇怪的是我的断点保持活跃

I know my logic is being executed as messages are shown in the console我知道我的逻辑正在执行,因为消息显示在控制台中

Paul保罗

Linking the answer in the comments 在评论中链接答案

https://stackoverflow.com/a/42118286/5946937 https://stackoverflow.com/a/42118286/5946937

  1. Close all Visual Studio windows. 关闭所有Visual Studio窗口。
  2. Restart the Service Fabric service: Type services.msc in the windows run tool. 重新启动Service Fabric服务:在Windows运行工具中键入services.msc。 Find Microsoft Service Fabric Host Service. 查找Microsoft Service Fabric主机服务。 Right Click + Restart. 右键单击+重新启动。
  3. Reset the local cluster: Look at the Service Fabric Local Cluster Manager Icon in the notification area in the right side of the task bar. 重置本地群集:在任务栏右侧的通知区域中查看Service Fabric本地群集管理器图标。 Right Click + Reset Local Cluster. 右键单击+重置本地群集。
  4. Open the problematic solution in Visual Studio. 在Visual Studio中打开有问题的解决方案。
  5. Clean and Rebuild solution. 清理并重建解决方案。
  6. Finally run your solution (press F5). 最后运行您的解决方案(按F5键)。

There is one other thing that I noticed.我注意到另一件事。 After pressing an F5, on the process tab, keep an eye on the process id按 F5 后,在进程选项卡上,留意进程 ID 在此处输入图像描述 (this is just a sample reference, not from a service fabric process), in my case, there were no processes attached at all. (这只是一个示例参考,不是来自服务结构流程),就我而言,根本没有附加任何流程。 In such a case, go to Debug -> Attach to Process -> Choose the process you need to debug.在这种情况下,go 调试->附加到进程->选择您需要调试的进程。 在此处输入图像描述 One thing to keep in mind is that sometimes you may have to select the show process from all users checkbox because visual studio may be running in admin mode but the application process maybe running in normal user mode.要记住的一件事是,有时您可能需要 select显示来自所有用户的进程复选框,因为 visual studio 可能在管理模式下运行,但应用程序进程可能在普通用户模式下运行。 在此处输入图像描述

You can also understand that the right process has not been attached when you see something like this看到这样也可以理解为没有附上正确的流程在此处输入图像描述 in front of the breakpoint.在断点前。 This is also an indication that the right process has not been attached.这也表明没有附加正确的过程。 If the right process has been attached, the debugging should be successful!如果附加了正确的进程,调试应该成功!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 服务结构-用于调试/测试目的的手动Actor停用 - Service fabric - Manual Actor Deactivation for debug/testing purposes Service Fabric 容器 - 无法访问集群内的服务 - Service Fabric Containers - Cannot Access Service within Cluster 无法调试wcf-windows服务 - Cannot debug wcf-windows service 无法从C#连接到Secure Service Fabric群集 - Cannot connect to Secure Service Fabric cluster from C# 无法在Service Fabric中的一个ActorRuntime中注册两个Actor - Cannot register two Actors within one ActorRuntime in Service Fabric 构建Service Fabric Web Api时,获取错误无法从Fabric.StatelessServiceContext转换为Fabric.ServiceInitializationParameters - Getting error cannot convert from Fabric.StatelessServiceContext to Fabric.ServiceInitializationParameters while building Service Fabric Web Api 服务结构服务远程处理 - Service Fabric Service Remoting 即使所有对象都可用,也无法使用AutoFac解决Azure Service Fabric服务 - Cannot resolve Azure Service Fabric service with AutoFac even all objects are available 即使“ MYAPPLICATION.ServiceFabricPkg”已更改,也无法升级Service Fabric服务 - Cannot upgrade Service Fabric service due to “'MYAPPLICATION.ServiceFabricPkg' has changed” even though it hasn't changed 服务结构和IConfigurationBuilder - Service Fabric and IConfigurationBuilder
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM