locked
Debugging/Tracing in WCF RRS feed

  • Question

  • User440671232 posted

    If I use Console.Writeln(""); in WCF, where will the output be placed? Is there anyway for debugging/tracing WCF Service?

    Thanks in advance.

    Thursday, July 4, 2013 1:04 AM

Answers

  • User-1583800459 posted

    Yes, you can debug the WCF service as you do with other web application. All you need to have a web debugger like Fiddler. Put the service url and put the input parameter and execute and also one more thing put the debugging point in your application.

    The URL will look like the below one:

    http://localhost:4680/testService.svc/json/testMethod

    The link to download the Fiddler web debugger at:

    http://fiddler2.com/

    Let me know, if you are not cleared with the answer.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, July 4, 2013 1:17 AM
  • User220959680 posted

    but what if I use WCF Test Client as a client, where will the Console.WriteLine output will be displayed?

    Console.WriteLine can't be displayed in WCF Test client. Use String.Format to output in WCF test client as shown below.

    public string GetData(int value)
    {
       return string.Format("You entered: {0}", value);
                
    }



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, July 4, 2013 7:17 PM

All replies

  • User-1583800459 posted

    Yes, you can debug the WCF service as you do with other web application. All you need to have a web debugger like Fiddler. Put the service url and put the input parameter and execute and also one more thing put the debugging point in your application.

    The URL will look like the below one:

    http://localhost:4680/testService.svc/json/testMethod

    The link to download the Fiddler web debugger at:

    http://fiddler2.com/

    Let me know, if you are not cleared with the answer.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, July 4, 2013 1:17 AM
  • User220959680 posted

    tracing WCF Service?

    Configuring tracing is done from the Web.config, refer my response on this thread

    http://forums.asp.net/t/1888153.aspx/1?WCF+Service+Image+not+transmitted+on+production

    use Console.Writeln(""); in WCF, where will the output be placed

    client that consumes the service receives the Console.Writeln(""); 

    debugging

    As the other member mentioned Fiddler can be used, other than fiddler it is quite feasible to use Visual Studio to debug the service when the service client, Web service are in single solution i.e., two projects in single solution.

    Thursday, July 4, 2013 5:08 AM
  • User440671232 posted

    jazzyhacker

    tracing WCF Service?

    Configuring tracing is done from the Web.config, refer my response on this thread

    http://forums.asp.net/t/1888153.aspx/1?WCF+Service+Image+not+transmitted+on+production

    jazzyhacker

    use Console.Writeln(""); in WCF, where will the output be placed

    client that consumes the service receives the Console.Writeln(""); 

    jazzyhacker

    debugging

    As the other member mentioned Fiddler can be used, other than fiddler it is quite feasible to use Visual Studio to debug the service when the service client, Web service are in single solution i.e., two projects in single solution.

    Dear Mr. Sukumarraju,

    Thanks for your answer, but what if I use WCF Test Client as a client, where will the Console.WriteLine output will be displayed?

    Thanks in advance.

    Thursday, July 4, 2013 11:09 AM
  • User220959680 posted

    but what if I use WCF Test Client as a client, where will the Console.WriteLine output will be displayed?

    Console.WriteLine can't be displayed in WCF Test client. Use String.Format to output in WCF test client as shown below.

    public string GetData(int value)
    {
       return string.Format("You entered: {0}", value);
                
    }



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, July 4, 2013 7:17 PM