Attach to aspnet_wp.exe process

  • Thread starter Thread starter John A. Bailo
  • Start date Start date
J

John A. Bailo

I am debugging a windows service that consumes a web service.

I set breakpoints in both.

Sometimes, after attaching to the windows service, the debugger will
auto-attach and run to my breakpoints in the web service. Other times
not.

My workaround is to attach to both the aspnet_wp.exe process and my
windows service, but I wonder why it auto-attaches sometimes and not others.
 
Hello, John!

JAB> Sometimes, after attaching to the windows service, the debugger will
JAB> auto-attach and run to my breakpoints in the web service. Other
JAB> times not.

What do you mean by "auto-attach"?

Are you sure you're attaching to correct aspnet_wp.exe? Sometimes, ( until web service first invoke ) types are not loaded, thus debugger will not touch any breakpoints.

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
 
Vadym said:
Hello, John!

JAB> Sometimes, after attaching to the windows service, the debugger will
JAB> auto-attach and run to my breakpoints in the web service. Other
JAB> times not.

What do you mean by "auto-attach"?

If I merely attach to the windows service, which calls a web service,
and step through an invoke of a web method, it will sometimes take me
into the web service code. In the debugger output you can see the
words "auto-attach" to the aspnet_wp.exe.
Are you sure you're attaching to correct aspnet_wp.exe?

Are there more than one of them?

Sometimes, ( until web service first invoke ) types are not loaded, thus debugger will not touch any breakpoints.

I don't quite understand. Can you elaborate?
 
Hello, John!

JAB> If I merely attach to the windows service, which calls a web service,
JAB> and step through an invoke of a web method, it will sometimes take me
JAB> into the web service code. In the debugger output you can see the
JAB> words "auto-attach" to the aspnet_wp.exe.

Did you try attachinh to aspnet_wp.exe manually and set breakpoint in webservice code?
--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
 
Do full debug build of both projects, and then debug.
Keep both projects in one solution.

Else make 2 solutions, web svc and win svc.
And run 2 vsnet ide and debug them separately, it will be neat.
 
Back
Top