无法调试工作者角色(模拟器)
Can't debug worker role (emulator)
我在 VisualStudio 2015
AZURE SDK 2.9
、C#
中创建了工作者角色
我在每个方法的开头添加了断点:
public override void Run()
{
public override bool OnStart()
{
private async Task RunAsync( CancellationToken cancellationToken )
{
但是当我在调试模式下启动我的应用程序时 none 这些断点命中。在模拟器中我看到这条消息:
[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
我做错了什么?如何在断点处停止工作者角色?
经过小小的调查,我找到了问题的根源:
从
更改角色后 class
public class IntegrationsSyncRole: RoleEntryPoint
到
public class IntegrationsSyncRole: DistributedJobRole
...
public class DistributedJobRole: RoleEntryPoint
断点停止命中。
解决方案是删除中间 class 并从 RoleEntryPoint
继承 IntegrationsSyncRole
而没有任何其他 classes。
我在 VisualStudio 2015
AZURE SDK 2.9
、C#
我在每个方法的开头添加了断点:
public override void Run()
{
public override bool OnStart()
{
private async Task RunAsync( CancellationToken cancellationToken )
{
但是当我在调试模式下启动我的应用程序时 none 这些断点命中。在模拟器中我看到这条消息:
[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
我做错了什么?如何在断点处停止工作者角色?
经过小小的调查,我找到了问题的根源:
从
更改角色后 classpublic class IntegrationsSyncRole: RoleEntryPoint
到
public class IntegrationsSyncRole: DistributedJobRole
...
public class DistributedJobRole: RoleEntryPoint
断点停止命中。
解决方案是删除中间 class 并从 RoleEntryPoint
继承 IntegrationsSyncRole
而没有任何其他 classes。