我已在 VisualStudio 2015
AZURE SDK 2.9
、C#
我在每个方法的开头添加了断点:
public override void Run()
{
public override bool OnStart()
{
private async Task RunAsync( CancellationToken cancellationToken )
{
但是当我在 Debug模式下启动应用程序时,这些断点都没有命中。在模拟器中我看到以下消息:
[fabric] Role Instance: deployment29(49).Channels.Jobs.Integr.Sync.Jobs.0
[fabric] Role state Started
[runtime] Role entrypoint . CALLING OnStart():Integr.Sync.Jobs.DistributedJobRole
[runtime] Role entrypoint . COMPLETED OnStart(): Integr.Sync.Jobs.DistributedJobRole
[runtime] Role entrypoint . CALLING Run():Integr.Sync.Jobs.DistributedJobRole
我做错了什么?如何在断点处停止辅助角色?
最佳答案
经过小调查,我找到了问题的根源:
更改角色类别后:
public class IntegrationsSyncRole: RoleEntryPoint
至
public class IntegrationsSyncRole: DistributedJobRole
...
public class DistributedJobRole: RoleEntryPoint
断点停止命中。
解决方案是删除中间类并从 RoleEntryPoint
继承 IntegrationsSyncRole
,而不使用任何其他类。
关于c# - 无法调试辅助角色(模拟器),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39757022/