最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

[转]The X++ debugger does not open…

AX 2012 William 2602浏览 0评论

… although you turned off “Execute business operations in CIL” in the “Tools > Options”.

Then there is probably a runAs(…) method somewhere down the call stack.

You can find such a runAs-call by setting a breakpoint in Visual Studio, attaching to the process and running your logic again. After the runAs-call is found, you can simply go replace it with a direct static method call.

For example:

/*
BEFORE
runas(runAsUserId,
    classnum(AifOutboundProcessingService),
    staticmethodstr(AifOutboundProcessingService,processAsUser),
    messageIdContainer,
    runAsCompany);
// AFTER
changeCompany(runAsCompany)
{
       AifOutboundProcessingService::processAsUser(messageIdContainer);
}

After this change, the X++ debugger will stop where needed.

Remember – this change is only for debugging purpose. You should not do that in the production code.

原文地址(GFW):http://sashanazarov.blogspot.com/2012/07/the-x-debugger-does-not-open.html

转载请注明:ww12345678 的部落格 | AX Helper » [转]The X++ debugger does not open…

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址