Debugging a WebService

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Arne

    #1

    Debugging a WebService

    Is there a secret trick to debugging a Web service?
    I compile my web service and test app in debug mode.
    The webservice has <compilation defaultLanguage ="vb" debug="true" /> in
    web.config.
    I set breakpoints in my web service.
    I try to step into my web services with F11 from my test app.
    My webservices executes, but I never reach my breakpoint and my webservice
    never executes in debug mode.

  • Drew Marsh

    #2
    Re: Debugging a WebService

    Arne wrote:
    [color=blue]
    > Is there a secret trick to debugging a Web service?
    > I compile my web service and test app in debug mode.
    > The webservice has <compilation defaultLanguage ="vb" debug="true" />
    > in
    > web.config.
    > I set breakpoints in my web service.
    > I try to step into my web services with F11 from my test app.
    > My webservices executes, but I never reach my breakpoint and my
    > webservice
    > never executes in debug mode.[/color]

    The problem is you probably set your test app as the startup project which means the debugger will attach to that process, however it will not automatically attach to ASP.NET's process. You need to explicitly attach to the process by going to Debug -> Processes -> Find and double click aspnet_wp.exe -> Make sure Common Language Runtime is checked off and hit ok.

    Now you're debugging both processes and should get the exact debugging experience you're expecting.

    HTH,
    Drew

    Comment

    • Magne Ryholt

      #3
      Re: Debugging a WebService

      Is it possible to automate this so we don't need to attach every time we
      start a new debug session ?
      "Drew Marsh" <drub0y@hotmail .no.spamming.co m> wrote in message
      news:eRI8MmmzEH A.4028@TK2MSFTN GP15.phx.gbl...[color=blue]
      > Arne wrote:
      >[color=green]
      >> Is there a secret trick to debugging a Web service?
      >> I compile my web service and test app in debug mode.
      >> The webservice has <compilation defaultLanguage ="vb" debug="true" />
      >> in
      >> web.config.
      >> I set breakpoints in my web service.
      >> I try to step into my web services with F11 from my test app.
      >> My webservices executes, but I never reach my breakpoint and my
      >> webservice
      >> never executes in debug mode.[/color]
      >
      > The problem is you probably set your test app as the startup project which
      > means the debugger will attach to that process, however it will not
      > automatically attach to ASP.NET's process. You need to explicitly attach
      > to the process by going to Debug -> Processes -> Find and double click
      > aspnet_wp.exe -> Make sure Common Language Runtime is checked off and hit
      > ok.
      >
      > Now you're debugging both processes and should get the exact debugging
      > experience you're expecting.
      >
      > HTH,
      > Drew
      >[/color]



      Comment

      • Drew Marsh

        #4
        Re: Debugging a WebService

        Magne Ryholt wrote:
        [color=blue]
        > Is it possible to automate this so we don't need to attach every time
        > we
        > start a new debug session ?[/color]

        Nothing straight forward that I know of, but you might be able to do it with
        a Macro.

        -Dre

        Comment

        Working...