locked
Debugging wcf service from plug-in RRS feed

  • Question

  • Hi All,

    I am calling a WCF service from a Plugin.  I can successfully debug my plugin by putting a breakpoint and attaching it to the w3wp.exe.  How can I step into the WCF service method that gets called from the plugin?

    Any help would be appreciated.

    Thanks.

    Friday, May 18, 2012 5:18 AM

Answers

  • fifo,

    Can you make sure that you check the "Show processes from all users" checkbox? Is your WCF Service hosted in IIS? If it is, it should have a corresponding w3wp process against it.

    Alternatively, what you can do instead of debugging into the WCF Service, you can note down the parameters that get passed in into the WCF and create an NUnit test / console app that pass in these parameters into the WCF service in your local machine.

    I hope this helps. If my response answered your question, please mark the response as an answer and also vote as helpful.


    Dimaz Pramudya - CRM Developer - CSG (Melbourne) www.xrmbits.com http://twitter.com/xrmbits

    Friday, May 18, 2012 6:33 AM

All replies

  • Hello,

    I believe that installation of Remote Debugger on PC where your WCF Service is deployed and attaching to remote server will solve your issue.


    Microsoft CRM Freelancer

    My blog (english)
    Мой блог (русскоязычный)
    Follow Andriy on Twitter

    Friday, May 18, 2012 5:26 AM
    Moderator
  • fifo123,

    You can open two instances of Visual Studio. One of them attaching to w3wp that is hosting CRM and the other VS instance attaching to w3wp that is hosting your WCF Service. 

    That way, when the breakpoint is hit on the plugin, you can just continue the execution and soon the breakpoint in your WCF will get hit as well.

    I hope this helps. If my response answered your question, please mark the response as an answer and also vote as helpful.


    Dimaz Pramudya - CRM Developer - CSG (Melbourne) www.xrmbits.com http://twitter.com/xrmbits



    Friday, May 18, 2012 5:40 AM
  • Hi Dimaz,

    The WCF service is hosted in a windows server 2008 R2 box and I can't find the w3wp process to attach to. Am I missing something?

    Friday, May 18, 2012 6:29 AM
  • fifo,

    Can you make sure that you check the "Show processes from all users" checkbox? Is your WCF Service hosted in IIS? If it is, it should have a corresponding w3wp process against it.

    Alternatively, what you can do instead of debugging into the WCF Service, you can note down the parameters that get passed in into the WCF and create an NUnit test / console app that pass in these parameters into the WCF service in your local machine.

    I hope this helps. If my response answered your question, please mark the response as an answer and also vote as helpful.


    Dimaz Pramudya - CRM Developer - CSG (Melbourne) www.xrmbits.com http://twitter.com/xrmbits

    Friday, May 18, 2012 6:33 AM