sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
Dmitri Shvetsov's Avatar

Web Service debugging ?


Question posted by: Dmitri Shvetsov (Guest) on November 13th, 2005 09:09 PM
Hi All,

Did somebody see the situation when the VS refuses to debug the Web Service
at all? I can't catch why, the initially created Web Service can be debugged
very easy but after some changes in a source code, maybe the source code
becomes bigger that some hidden threshold, the debugger can't enter into
this code anymore. I can use this web service, all methods but can't see in
debugger what's going on. I have already catched this situation several
times beginning a new solution from scratch and adding a web service.
Suddenly debugger loses the web service at all.

Windows 2000 Pro, VS .NET 2003, C#.

Help, please, if somebody knows any possible reason!

Thank you.
Dmitri S.


6 Answers Posted
Philip Miseldine's Avatar
Philip Miseldine November 13th, 2005 09:09 PM
Guest - n/a Posts
#2: Re: Web Service debugging ?

Not sure how relevant it is, but I use this method to debug XML-RPC services
I write in C#:

1. Compile your web app, and bring up the .asmx file in your browser for
your asp.net service to run.

2. Click the Debug -> Processes menu to bring up a list of active processes
on your machine.

3. Double click on the aspnet_wp.exe process, and check "Common Language
Runtime", and click OK.

4. VS.NET will go into debug mode, and you can set your breakpoints etc.
from there.

5. Call your service, etc. and you should get full debug in VS.NET

Regards,

Phil (miseldinedev.com)

"Dmitri Shvetsov" <dshvetsov@cox.net> wrote in message
news:P92Pa.263$Bd5.20@fed1read01...[color=blue]
> Hi All,
>
> Did somebody see the situation when the VS refuses to debug the Web[/color]
Service[color=blue]
> at all? I can't catch why, the initially created Web Service can be[/color]
debugged[color=blue]
> very easy but after some changes in a source code, maybe the source code
> becomes bigger that some hidden threshold, the debugger can't enter into
> this code anymore. I can use this web service, all methods but can't see[/color]
in[color=blue]
> debugger what's going on. I have already catched this situation several
> times beginning a new solution from scratch and adding a web service.
> Suddenly debugger loses the web service at all.
>
> Windows 2000 Pro, VS .NET 2003, C#.
>
> Help, please, if somebody knows any possible reason!
>
> Thank you.
> Dmitri S.
>
>[/color]


Dmitri Shvetsov's Avatar
Guest - n/a Posts
#3: Re: Web Service debugging ?

You know, it's funny but when you create the Web Service from scratch and a
program that uses this Service, you can trace step by step the Web Service
also. It's easy. But after some step the built-in debugger refuses to enter
into the Web Service code at all. That's a problem that I can not
understand.

Regards,
Dmitri.

"Philip Miseldine" <news@miseldine.com> wrote in message
news:O1nI$KoRDHA.1556@TK2MSFTNGP10.phx.gbl...[color=blue]
> Not sure how relevant it is, but I use this method to debug XML-RPC[/color]
services[color=blue]
> I write in C#:
> 1. Compile your web app, and bring up the .asmx file in your browser for
> your asp.net service to run.
> 2. Click the Debug -> Processes menu to bring up a list of active[/color]
processes[color=blue]
> on your machine.
> 3. Double click on the aspnet_wp.exe process, and check "Common Language
> Runtime", and click OK.
> 4. VS.NET will go into debug mode, and you can set your breakpoints etc.
> from there.
> 5. Call your service, etc. and you should get full debug in VS.NET
> Regards,
> Phil (miseldinedev.com)[/color]
[color=blue]
> "Dmitri Shvetsov" <dshvetsov@cox.net> wrote in message
> news:P92Pa.263$Bd5.20@fed1read01...[color=green]
> > Hi All,
> > Did somebody see the situation when the VS refuses to debug the Web[/color]
> Service[color=green]
> > at all? I can't catch why, the initially created Web Service can be[/color]
> debugged[color=green]
> > very easy but after some changes in a source code, maybe the source code
> > becomes bigger that some hidden threshold, the debugger can't enter into
> > this code anymore. I can use this web service, all methods but can't see[/color]
> in[color=green]
> > debugger what's going on. I have already catched this situation several
> > times beginning a new solution from scratch and adding a web service.
> > Suddenly debugger loses the web service at all.
> >
> > Windows 2000 Pro, VS .NET 2003, C#.
> >
> > Help, please, if somebody knows any possible reason!
> >
> > Thank you.
> > Dmitri S.
> >
> >[/color]
>
>[/color]


Dmitri Shvetsov's Avatar
Guest - n/a Posts
#4: Re: Web Service debugging ?

Not exactly. Even when I reboot the VS refuses to enter inside this code.
That's still a problem for me.

When I create a new Web Service I can debug it but for some reason the VS
begins to refuse to get into the Web Service methods at all. I tried to
change Configurations, Paths, something else, I'm sure that the project and
the Solution at all are compiled in DEBUG mode, nothing can help. I have a
suspicion that VS has something like a board size after that the built-in
debugger can't work correctly. I met that already several time and ca not
find a reasonable answer. And this occurs ONLY for Web Services, other
applications, class libraries etc can be debugged as usually.

Regards,
Dmitri.

"Mark Pearce" <evil@bay.com>
[color=blue]
> What's probably happening is that when you stop debugging, the ASP.NET
> worker process is not being terminated. That means that as you start and
> stop debugging, you're gathering a bunch of orphaned ASP.NET worker
> processes, and the debugger becomes confused about which of these[/color]
processes[color=blue]
> is handling your current ASP.NET debug session.
>
> To prevent this behaviour, before you stop debugging you need to ensure[/color]
that[color=blue]
> the debugger terminates the ASP.NET worker process rather than just
> detaching from it. This option is available on the Processes... dialog
> window on the Debug menu.[/color]
----------------------------------------------------------------------------
-----[color=blue]
> Did somebody see the situation when the VS refuses to debug the Web[/color]
Service[color=blue]
> at all? I can't catch why, the initially created Web Service can be[/color]
debugged[color=blue]
> very easy but after some changes in a source code, maybe the source code
> becomes bigger that some hidden threshold, the debugger can't enter into
> this code anymore. I can use this web service, all methods but can't see[/color]
in[color=blue]
> debugger what's going on. I have already catched this situation several
> times beginning a new solution from scratch and adding a web service.
> Suddenly debugger loses the web service at all.
>
> Windows 2000 Pro, VS .NET 2003, C#.[/color]


Mark Pearce's Avatar
Guest - n/a Posts
#5: Re: Web Service debugging ?

Hi Dmitri,

So you can confirm that your environment is set to "Terminate" rather than
"Detach" from the ASP.NET worker process?

If so, you need to investigate other possibilities. When this problem
happens, have you tried setting a breakpoint within a web service method and
seeing whether it's triggered? IOW, is the debugger just refusing to step
into the web service, or is it refusing any interaction at all?

When you run the following command line, does it report that the web service
executable and its PDB file are matched?

dumpbin /PDBPATH:VERBOSE \C:\YourWebService.exe

HTH,

Mark
--
Author of "Comprehensive VB .NET Debugging"
http://www.apress.com/book/bookDisplay.html?bID=128


"Dmitri Shvetsov" <dshvetsov@cox.net> wrote in message
news:3GnRa.480$Ne.92@fed1read03...
Not exactly. Even when I reboot the VS refuses to enter inside this code.
That's still a problem for me.

When I create a new Web Service I can debug it but for some reason the VS
begins to refuse to get into the Web Service methods at all. I tried to
change Configurations, Paths, something else, I'm sure that the project and
the Solution at all are compiled in DEBUG mode, nothing can help. I have a
suspicion that VS has something like a board size after that the built-in
debugger can't work correctly. I met that already several time and ca not
find a reasonable answer. And this occurs ONLY for Web Services, other
applications, class libraries etc can be debugged as usually.

Regards,
Dmitri.

"Mark Pearce" <evil@bay.com>
[color=blue]
> What's probably happening is that when you stop debugging, the ASP.NET
> worker process is not being terminated. That means that as you start and
> stop debugging, you're gathering a bunch of orphaned ASP.NET worker
> processes, and the debugger becomes confused about which of these[/color]
processes[color=blue]
> is handling your current ASP.NET debug session.
>
> To prevent this behaviour, before you stop debugging you need to ensure[/color]
that[color=blue]
> the debugger terminates the ASP.NET worker process rather than just
> detaching from it. This option is available on the Processes... dialog
> window on the Debug menu.[/color]
----------------------------------------------------------------------------
-----[color=blue]
> Did somebody see the situation when the VS refuses to debug the Web[/color]
Service[color=blue]
> at all? I can't catch why, the initially created Web Service can be[/color]
debugged[color=blue]
> very easy but after some changes in a source code, maybe the source code
> becomes bigger that some hidden threshold, the debugger can't enter into
> this code anymore. I can use this web service, all methods but can't see[/color]
in[color=blue]
> debugger what's going on. I have already catched this situation several
> times beginning a new solution from scratch and adding a web service.
> Suddenly debugger loses the web service at all.
>
> Windows 2000 Pro, VS .NET 2003, C#.[/color]



Dmitri Shvetsov's Avatar
Guest - n/a Posts
#6: Re: Web Service debugging ?

Hi Mark, thank you for attention.

You know I use usual method to trace something inside this code. Initially
when I just created this code I can debug and go step by step inside this
code. But I wrote here that after some step debugger refuses to wrok inside
this block. I tried to include the code inside this Web Service like

//--------------------------------------------------------------------------
-----------
[Conditional("DEBUG")]
public static void Debug(string msg) {
Console.WriteLine(msg);
}

To print my information to console. Nothing. So, I understand that this code
doesn t have any debug info anymore. That's strange. I work with Web
Services for several months and already saw this joke with all my services.
After some size of the code the debugger refuses to work with this service
at all. It seems to me that it has some size limit, maybe something
undocumented in ideology, I don't know.

The main interesting thing for me that I don;t do anything to get this
effect. I remember some moment with this WS when I added another one
WebMethod and after that I could not debug. When I deleted this method - I
could debug again. That's anoying me so much.

That's the report from your query.

dumpbin /PDBPATH:VERBOSE WebServiceUpdate.dll
Microsoft (R) COFF/PE Dumper Version 7.00.9466
Copyright (C) Microsoft Corporation. All rights reserved.

Dump of file WebServiceUpdate.dll

File Type: DLL
PDB file found at '.\WebServiceUpdate.pdb'

Summary

2000 .reloc
2000 .rsrc
2000 .text

Cool? Everything exists doesn't it?

Regards,
Dmitri.

"Mark Pearce" Join Bytes!
[color=blue]
> So you can confirm that your environment is set to "Terminate" rather than
> "Detach" from the ASP.NET worker process?
>
> If so, you need to investigate other possibilities. When this problem
> happens, have you tried setting a breakpoint within a web service method[/color]
and[color=blue]
> seeing whether it's triggered? IOW, is the debugger just refusing to step
> into the web service, or is it refusing any interaction at all?
>
> When you run the following command line, does it report that the web[/color]
service[color=blue]
> executable and its PDB file are matched?
>
> dumpbin /PDBPATH:VERBOSE \C:\YourWebService.exe
>
> HTH,
>
> Mark
> --
> Author of "Comprehensive VB .NET Debugging"
> http://www.apress.com/book/bookDisplay.html?bID=128
>
>
> "Dmitri Shvetsov" <dshvetsov@cox.net> wrote in message
> news:3GnRa.480$Ne.92@fed1read03...
> Not exactly. Even when I reboot the VS refuses to enter inside this code.
> That's still a problem for me.
>
> When I create a new Web Service I can debug it but for some reason the VS
> begins to refuse to get into the Web Service methods at all. I tried to
> change Configurations, Paths, something else, I'm sure that the project[/color]
and[color=blue]
> the Solution at all are compiled in DEBUG mode, nothing can help. I have a
> suspicion that VS has something like a board size after that the built-in
> debugger can't work correctly. I met that already several time and ca not
> find a reasonable answer. And this occurs ONLY for Web Services, other
> applications, class libraries etc can be debugged as usually.
>
> Regards,
> Dmitri.
>
> "Mark Pearce" <evil@bay.com>
>[color=green]
> > What's probably happening is that when you stop debugging, the ASP.NET
> > worker process is not being terminated. That means that as you start and
> > stop debugging, you're gathering a bunch of orphaned ASP.NET worker
> > processes, and the debugger becomes confused about which of these[/color]
> processes[color=green]
> > is handling your current ASP.NET debug session.
> >
> > To prevent this behaviour, before you stop debugging you need to ensure[/color]
> that[color=green]
> > the debugger terminates the ASP.NET worker process rather than just
> > detaching from it. This option is available on the Processes... dialog
> > window on the Debug menu.[/color]
> --------------------------------------------------------------------------[/color]
--[color=blue]
> -----[color=green]
> > Did somebody see the situation when the VS refuses to debug the Web[/color]
> Service[color=green]
> > at all? I can't catch why, the initially created Web Service can be[/color]
> debugged[color=green]
> > very easy but after some changes in a source code, maybe the source code
> > becomes bigger that some hidden threshold, the debugger can't enter into
> > this code anymore. I can use this web service, all methods but can't see[/color]
> in[color=green]
> > debugger what's going on. I have already catched this situation several
> > times beginning a new solution from scratch and adding a web service.
> > Suddenly debugger loses the web service at all.
> >
> > Windows 2000 Pro, VS .NET 2003, C#.[/color]
>
>
>[/color]


Mark Pearce's Avatar
Guest - n/a Posts
#7: Re: Web Service debugging ?

Hi Dmitri,

Can you debug this web service with the Dbgclr debugger, or with the
command-line debugger Cordbg? I'm trying to establish whether this is just
an issue with the Visual Studio debugger.

Regards,

Mark
--
Author of "Comprehensive VB .NET Debugging"
http://www.apress.com/book/bookDisplay.html?bID=128


"Dmitri Shvetsov" <dshvetsov@cox.net> wrote in message
news:2K7Sa.5837$Ne.4326@fed1read03...
Hi Mark, thank you for attention.

You know I use usual method to trace something inside this code. Initially
when I just created this code I can debug and go step by step inside this
code. But I wrote here that after some step debugger refuses to wrok inside
this block. I tried to include the code inside this Web Service like

//--------------------------------------------------------------------------
-----------
[Conditional("DEBUG")]
public static void Debug(string msg) {
Console.WriteLine(msg);
}

To print my information to console. Nothing. So, I understand that this code
doesn t have any debug info anymore. That's strange. I work with Web
Services for several months and already saw this joke with all my services.
After some size of the code the debugger refuses to work with this service
at all. It seems to me that it has some size limit, maybe something
undocumented in ideology, I don't know.

The main interesting thing for me that I don;t do anything to get this
effect. I remember some moment with this WS when I added another one
WebMethod and after that I could not debug. When I deleted this method - I
could debug again. That's anoying me so much.

That's the report from your query.

dumpbin /PDBPATH:VERBOSE WebServiceUpdate.dll
Microsoft (R) COFF/PE Dumper Version 7.00.9466
Copyright (C) Microsoft Corporation. All rights reserved.

Dump of file WebServiceUpdate.dll

File Type: DLL
PDB file found at '.\WebServiceUpdate.pdb'

Summary

2000 .reloc
2000 .rsrc
2000 .text

Cool? Everything exists doesn't it?

Regards,
Dmitri.

"Mark Pearce" Join Bytes!
[color=blue]
> So you can confirm that your environment is set to "Terminate" rather than
> "Detach" from the ASP.NET worker process?
>
> If so, you need to investigate other possibilities. When this problem
> happens, have you tried setting a breakpoint within a web service method[/color]
and[color=blue]
> seeing whether it's triggered? IOW, is the debugger just refusing to step
> into the web service, or is it refusing any interaction at all?
>
> When you run the following command line, does it report that the web[/color]
service[color=blue]
> executable and its PDB file are matched?
>
> dumpbin /PDBPATH:VERBOSE \C:\YourWebService.exe
>
> HTH,
>
> Mark
> --
> Author of "Comprehensive VB .NET Debugging"
> http://www.apress.com/book/bookDisplay.html?bID=128
>
>
> "Dmitri Shvetsov" <dshvetsov@cox.net> wrote in message
> news:3GnRa.480$Ne.92@fed1read03...
> Not exactly. Even when I reboot the VS refuses to enter inside this code.
> That's still a problem for me.
>
> When I create a new Web Service I can debug it but for some reason the VS
> begins to refuse to get into the Web Service methods at all. I tried to
> change Configurations, Paths, something else, I'm sure that the project[/color]
and[color=blue]
> the Solution at all are compiled in DEBUG mode, nothing can help. I have a
> suspicion that VS has something like a board size after that the built-in
> debugger can't work correctly. I met that already several time and ca not
> find a reasonable answer. And this occurs ONLY for Web Services, other
> applications, class libraries etc can be debugged as usually.
>
> Regards,
> Dmitri.
>
> "Mark Pearce" <evil@bay.com>
>[color=green]
> > What's probably happening is that when you stop debugging, the ASP.NET
> > worker process is not being terminated. That means that as you start and
> > stop debugging, you're gathering a bunch of orphaned ASP.NET worker
> > processes, and the debugger becomes confused about which of these[/color]
> processes[color=green]
> > is handling your current ASP.NET debug session.
> >
> > To prevent this behaviour, before you stop debugging you need to ensure[/color]
> that[color=green]
> > the debugger terminates the ASP.NET worker process rather than just
> > detaching from it. This option is available on the Processes... dialog
> > window on the Debug menu.[/color]
> --------------------------------------------------------------------------[/color]
--[color=blue]
> -----[color=green]
> > Did somebody see the situation when the VS refuses to debug the Web[/color]
> Service[color=green]
> > at all? I can't catch why, the initially created Web Service can be[/color]
> debugged[color=green]
> > very easy but after some changes in a source code, maybe the source code
> > becomes bigger that some hidden threshold, the debugger can't enter into
> > this code anymore. I can use this web service, all methods but can't see[/color]
> in[color=green]
> > debugger what's going on. I have already catched this situation several
> > times beginning a new solution from scratch and adding a web service.
> > Suddenly debugger loses the web service at all.
> >
> > Windows 2000 Pro, VS .NET 2003, C#.[/color]
>
>
>[/color]



 
Not the answer you were looking for? Post your question . . .
196,828 members ready to help you find a solution.
Join Bytes.com

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 196,828 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top Community Contributors