Welcome to MobyThreads.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

IIS 5.1/Xp/VS8 debugging ISAPIs

 
   Web Hosting and Web Master Forums (Home) -> IIS RSS
Related Topics:
IIS Debugging - Do you need to be a developer to figure out why are failing in IIS using iisstate? I'm in 3rd level support of iis and am wondering if there is training in this area for

Debugging ASP.NET App on IIS 6 - I'm ASP.NET on WinXP with IIS 5, My box is Win2003 with IIS 6 Natually the works well on the box, but hangs (after 5min returns a 404 error) on the machine. Event Logs are..

IIS 6.0 Debugging ASP 3.0 - Hi All, I've the Debug Option to debug any ASP page, but it debugs the 80% of errors. Also try with the IIS5.0 Server but no way... Errors like or Objects are not processed and the request is only a

set up debugging - I set up enable ASP debugging in on but whenever I open script debugger from microsoft script debugger, and open a file *.asp. The debug menu is disabled and I cannot set up a break..

using IIS 5.0 for debugging - I am receiing the following error when I am using Viusal Interdev to step through some Viusal Basic script code: The browser was unable to promote itself to master browser. The computer that currently believes it is the master browser is..
Next:  IIS: Can't install IIS on 2003 server  
Author Message
Mark

External


Since: Nov 01, 2007
Posts: 9



(Msg. 1) Posted: Thu Nov 01, 2007 10:17 am
Post subject: IIS 5.1/Xp/VS8 debugging ISAPIs
Archived from groups: microsoft>public>inetserver>iis (more info?)

Hi...

Haven't had to debug ISAPIs in a *long* time; this is the first time I've
had to do it with the new tools, and I'm seeing weird things, at least
compared to VS 2003.

I've got the ISAPIs installed on IIS 5.1.
I've attached the debugger to inetinfo.exe.
I've got my source loaded with breakpoints set (it let me set the
breakpoints, so it seems the symbols are loaded)
....
but the breakpoints are never hit.

Another weird thing - If I go to the Modules page, it doesn't show anything
on the list unless the module is loaded *while* the Modules page is up. If I
iisreset, bring up the modules page, then hit it with a request, a bunch of
modules show up. If I close the modules page and reopen it, there's nothing
in the list.

Is there any way to get to break points in unmanaged code in VS8?

Thanks
Mark

ps Intellisense doesn't seem to work very well for C++ in VS8 either. Kinda
surprised me.

 >> Stay informed about: IIS 5.1/Xp/VS8 debugging ISAPIs 
Back to top
Login to vote
David Wang

External


Since: Nov 01, 2007
Posts: 309



(Msg. 2) Posted: Thu Nov 01, 2007 1:39 pm
Post subject: Re: IIS 5.1/Xp/VS8 debugging ISAPIs [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hmm, interesting.

So, I go and install VS8 on XP Pro to see what's going on when
debugging global ISAPI Filters (standard C++). I followed all your
steps (other than the Modules page -- I know what you are talking
about, but I cannot find it on VS8, so I used TLIST.EXE to give me the
same information), and I actually hit my breakpoint with that request.

Can you clarify if you are loading global or site ISAPI Filters?


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//


On Nov 1, 11:26 am, Mark <mmodr... DeleteThis @nospam.nospam> wrote:
> Hi David...
>
> Thank you for your reply. To answer your questions,
> 1. I have 2 ISAPI Filters, the pdbs for both live in the same dir as the
> .dlls.
>
> 2. I have the website in low isolation mode
>
> 3. Sorry for the confusion about the Modules page. I was referring to the
> window between IISRESET and the first request coming in and priming the pump
> with all the late-bound loads. If I
> a. IISRESET
> b. attach inetinfo.exe
> c. open the Modules page (which is empty)
> d. fire a request to the web server
> I will see modules appear on the Modules page as the request is being served
> and programs are being late-loaded.
>
> If I close the Modules page and reopen it, it's empty again.
>
> I've also gone to the Modules page and under Symbol Settings I've manually
> entered the paths to my ISAPI pdb files.
>
> I figure the pdbs must be in there, since it does allow me to set
> breakpoints; they just never get tripped. When the pdbs weren't loaded, it
> wouldn't let me set the breakpoints.
>
> It's a shame if VS8 isn't any good for cpp debugging anymore; VS 2003 was
> great. Using WinDbg just feels like driving a Yugo.
>
> Thanks
> Mark
>
>
>
> "David Wang" wrote:
> > First, let's verify some missing details in user configuration that
> > can affect debugging.
>
> > - Where is the PDB for the ISAPI DLL?
> > - Are you talking about ISAPI Extension or ISAPI Filter DLL
> > - What Application Isolation mode is the Default Website using
>
> > Caveat: I do not use any Visual Studio to debug native or managed
> > code, so there may be real oddities in VS8, but let's take care of the
> > user-configuration first. For the curious, I use the NTSD/WINDBG
> > debuggers from Microsoft's Debugging Toolkit for native-code and
> > managed-code interop, and then a private debugging tool for managed
> > code.
>
> > Details:
> > 1. Only ISAPI Filter is guaranteed to be in inetinfo.exe on IIS 5.1.
> > ISAPI Extension can be in inetinfo.exe if in Low Isolation Mode, and
> > in the Medium/High Isolation Mode, it's in some dllhost.exe. Use
> > TLIST.EXE from the Debugging Toolkit to find it. Obviously, you want
> > to attach the debugger to the right process executing the ISAPI or
> > else no breakpoints get hit. Furthermore, ISAPI Filter DLLs configured
> > at the site-level are loaded/unloaded on the fly as needed.
>
> > Thus, only global ISAPI Filters are guaranteed to be loaded in
> > inetinfo.exe by the time you attach debuggers to it from a UI (there
> > are ways to attach debuggers ASAP or trigger breakpoints as soon as a
> > DLL load, but you are not using those techniques here). Anything else
> > MAY be in inetinfo.exe by the time you attach debuggers, but they may
> > not be. Hence, I wanted details to confirm.
>
> > 2. IISRESET will restart all IIS-related processes, so I don't know
> > how you can see the Modules page work across IISRESET -- unless Visual
> > Studio started auto-re-attaching to processes (which is kinda scary
> > behavior, in my mind)
>
> > 3. Make sure to tell VS where the PDB for the ISAPI DLL is located, or
> > put the PDB alongside the DLL
>
> > //David
> >http://w3-4u.blogspot.com
> >http://blogs.msdn.com/David.Wang
> > //
>
> > On Nov 1, 10:17 am, Mark <mmodr... DeleteThis @nospam.nospam> wrote:
> > > Hi...
>
> > > Haven't had to debug ISAPIs in a *long* time; this is the first time I've
> > > had to do it with the new tools, and I'm seeing weird things, at least
> > > compared to VS 2003.
>
> > > I've got the ISAPIs installed on IIS 5.1.
> > > I've attached the debugger to inetinfo.exe.
> > > I've got my source loaded with breakpoints set (it let me set the
> > > breakpoints, so it seems the symbols are loaded)
> > > ...
> > > but the breakpoints are never hit.
>
> > > Another weird thing - If I go to the Modules page, it doesn't show anything
> > > on the list unless the module is loaded *while* the Modules page is up. If I
> > > iisreset, bring up the modules page, then hit it with a request, a bunch of
> > > modules show up. If I close the modules page and reopen it, there's nothing
> > > in the list.
>
> > > Is there any way to get to break points in unmanaged code in VS8?
>
> > > Thanks
> > > Mark
>
> > > ps Intellisense doesn't seem to work very well for C++ in VS8 either. Kinda
> > > surprised me.- Hide quoted text -
>
> - Show quoted text -

 >> Stay informed about: IIS 5.1/Xp/VS8 debugging ISAPIs 
Back to top
Login to vote
Mark

External


Since: Nov 01, 2007
Posts: 9



(Msg. 3) Posted: Thu Nov 01, 2007 2:01 pm
Post subject: Re: IIS 5.1/Xp/VS8 debugging ISAPIs [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi David...

I've got them attached to the site, not the global level. I guess I should
go try it the other way. I've set break points in every method of the isapi
and haven't seen a hit.

Don't ask me why, but the ISAPI is also instantiating a C# object wrapped in
COM; I put breaks in the C# code but those don't get hit either. I can tell
from the output, though, that the code is getting run.

The Modules page in VS8 in under Debug > Windows when you're attached to a
process.

"David Wang" wrote:

> Hmm, interesting.
>
> So, I go and install VS8 on XP Pro to see what's going on when
> debugging global ISAPI Filters (standard C++). I followed all your
> steps (other than the Modules page -- I know what you are talking
> about, but I cannot find it on VS8, so I used TLIST.EXE to give me the
> same information), and I actually hit my breakpoint with that request.
>
> Can you clarify if you are loading global or site ISAPI Filters?
>
>
> //David
> http://w3-4u.blogspot.com
> http://blogs.msdn.com/David.Wang
> //
>
>
> On Nov 1, 11:26 am, Mark <mmodr....TakeThisOut@nospam.nospam> wrote:
> > Hi David...
> >
> > Thank you for your reply. To answer your questions,
> > 1. I have 2 ISAPI Filters, the pdbs for both live in the same dir as the
> > .dlls.
> >
> > 2. I have the website in low isolation mode
> >
> > 3. Sorry for the confusion about the Modules page. I was referring to the
> > window between IISRESET and the first request coming in and priming the pump
> > with all the late-bound loads. If I
> > a. IISRESET
> > b. attach inetinfo.exe
> > c. open the Modules page (which is empty)
> > d. fire a request to the web server
> > I will see modules appear on the Modules page as the request is being served
> > and programs are being late-loaded.
> >
> > If I close the Modules page and reopen it, it's empty again.
> >
> > I've also gone to the Modules page and under Symbol Settings I've manually
> > entered the paths to my ISAPI pdb files.
> >
> > I figure the pdbs must be in there, since it does allow me to set
> > breakpoints; they just never get tripped. When the pdbs weren't loaded, it
> > wouldn't let me set the breakpoints.
> >
> > It's a shame if VS8 isn't any good for cpp debugging anymore; VS 2003 was
> > great. Using WinDbg just feels like driving a Yugo.
> >
> > Thanks
> > Mark
> >
> >
> >
> > "David Wang" wrote:
> > > First, let's verify some missing details in user configuration that
> > > can affect debugging.
> >
> > > - Where is the PDB for the ISAPI DLL?
> > > - Are you talking about ISAPI Extension or ISAPI Filter DLL
> > > - What Application Isolation mode is the Default Website using
> >
> > > Caveat: I do not use any Visual Studio to debug native or managed
> > > code, so there may be real oddities in VS8, but let's take care of the
> > > user-configuration first. For the curious, I use the NTSD/WINDBG
> > > debuggers from Microsoft's Debugging Toolkit for native-code and
> > > managed-code interop, and then a private debugging tool for managed
> > > code.
> >
> > > Details:
> > > 1. Only ISAPI Filter is guaranteed to be in inetinfo.exe on IIS 5.1.
> > > ISAPI Extension can be in inetinfo.exe if in Low Isolation Mode, and
> > > in the Medium/High Isolation Mode, it's in some dllhost.exe. Use
> > > TLIST.EXE from the Debugging Toolkit to find it. Obviously, you want
> > > to attach the debugger to the right process executing the ISAPI or
> > > else no breakpoints get hit. Furthermore, ISAPI Filter DLLs configured
> > > at the site-level are loaded/unloaded on the fly as needed.
> >
> > > Thus, only global ISAPI Filters are guaranteed to be loaded in
> > > inetinfo.exe by the time you attach debuggers to it from a UI (there
> > > are ways to attach debuggers ASAP or trigger breakpoints as soon as a
> > > DLL load, but you are not using those techniques here). Anything else
> > > MAY be in inetinfo.exe by the time you attach debuggers, but they may
> > > not be. Hence, I wanted details to confirm.
> >
> > > 2. IISRESET will restart all IIS-related processes, so I don't know
> > > how you can see the Modules page work across IISRESET -- unless Visual
> > > Studio started auto-re-attaching to processes (which is kinda scary
> > > behavior, in my mind)
> >
> > > 3. Make sure to tell VS where the PDB for the ISAPI DLL is located, or
> > > put the PDB alongside the DLL
> >
> > > //David
> > >http://w3-4u.blogspot.com
> > >http://blogs.msdn.com/David.Wang
> > > //
> >
> > > On Nov 1, 10:17 am, Mark <mmodr....TakeThisOut@nospam.nospam> wrote:
> > > > Hi...
> >
> > > > Haven't had to debug ISAPIs in a *long* time; this is the first time I've
> > > > had to do it with the new tools, and I'm seeing weird things, at least
> > > > compared to VS 2003.
> >
> > > > I've got the ISAPIs installed on IIS 5.1.
> > > > I've attached the debugger to inetinfo.exe.
> > > > I've got my source loaded with breakpoints set (it let me set the
> > > > breakpoints, so it seems the symbols are loaded)
> > > > ...
> > > > but the breakpoints are never hit.
> >
> > > > Another weird thing - If I go to the Modules page, it doesn't show anything
> > > > on the list unless the module is loaded *while* the Modules page is up. If I
> > > > iisreset, bring up the modules page, then hit it with a request, a bunch of
> > > > modules show up. If I close the modules page and reopen it, there's nothing
> > > > in the list.
> >
> > > > Is there any way to get to break points in unmanaged code in VS8?
> >
> > > > Thanks
> > > > Mark
> >
> > > > ps Intellisense doesn't seem to work very well for C++ in VS8 either. Kinda
> > > > surprised me.- Hide quoted text -
> >
> > - Show quoted text -
>
>
>
 >> Stay informed about: IIS 5.1/Xp/VS8 debugging ISAPIs 
Back to top
Login to vote
Mark

External


Since: Nov 01, 2007
Posts: 9



(Msg. 4) Posted: Thu Nov 01, 2007 3:07 pm
Post subject: Re: IIS 5.1/Xp/VS8 debugging ISAPIs [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Just a little more info... I used tasklist and saw that the ISAPI dlls are
indeed loaded, and they are being compiled debug... Still no breaking at
breakpoints, unfortunately...

Thanks
Mark


"Mark" wrote:

> Hi David...
>
> I've got them attached to the site, not the global level. I guess I should
> go try it the other way. I've set break points in every method of the isapi
> and haven't seen a hit.
>
> Don't ask me why, but the ISAPI is also instantiating a C# object wrapped in
> COM; I put breaks in the C# code but those don't get hit either. I can tell
> from the output, though, that the code is getting run.
>
> The Modules page in VS8 in under Debug > Windows when you're attached to a
> process.
>
> "David Wang" wrote:
>
> > Hmm, interesting.
> >
> > So, I go and install VS8 on XP Pro to see what's going on when
> > debugging global ISAPI Filters (standard C++). I followed all your
> > steps (other than the Modules page -- I know what you are talking
> > about, but I cannot find it on VS8, so I used TLIST.EXE to give me the
> > same information), and I actually hit my breakpoint with that request.
> >
> > Can you clarify if you are loading global or site ISAPI Filters?
> >
> >
> > //David
> > http://w3-4u.blogspot.com
> > http://blogs.msdn.com/David.Wang
> > //
> >
> >
> > On Nov 1, 11:26 am, Mark <mmodr....DeleteThis@nospam.nospam> wrote:
> > > Hi David...
> > >
> > > Thank you for your reply. To answer your questions,
> > > 1. I have 2 ISAPI Filters, the pdbs for both live in the same dir as the
> > > .dlls.
> > >
> > > 2. I have the website in low isolation mode
> > >
> > > 3. Sorry for the confusion about the Modules page. I was referring to the
> > > window between IISRESET and the first request coming in and priming the pump
> > > with all the late-bound loads. If I
> > > a. IISRESET
> > > b. attach inetinfo.exe
> > > c. open the Modules page (which is empty)
> > > d. fire a request to the web server
> > > I will see modules appear on the Modules page as the request is being served
> > > and programs are being late-loaded.
> > >
> > > If I close the Modules page and reopen it, it's empty again.
> > >
> > > I've also gone to the Modules page and under Symbol Settings I've manually
> > > entered the paths to my ISAPI pdb files.
> > >
> > > I figure the pdbs must be in there, since it does allow me to set
> > > breakpoints; they just never get tripped. When the pdbs weren't loaded, it
> > > wouldn't let me set the breakpoints.
> > >
> > > It's a shame if VS8 isn't any good for cpp debugging anymore; VS 2003 was
> > > great. Using WinDbg just feels like driving a Yugo.
> > >
> > > Thanks
> > > Mark
> > >
> > >
> > >
> > > "David Wang" wrote:
> > > > First, let's verify some missing details in user configuration that
> > > > can affect debugging.
> > >
> > > > - Where is the PDB for the ISAPI DLL?
> > > > - Are you talking about ISAPI Extension or ISAPI Filter DLL
> > > > - What Application Isolation mode is the Default Website using
> > >
> > > > Caveat: I do not use any Visual Studio to debug native or managed
> > > > code, so there may be real oddities in VS8, but let's take care of the
> > > > user-configuration first. For the curious, I use the NTSD/WINDBG
> > > > debuggers from Microsoft's Debugging Toolkit for native-code and
> > > > managed-code interop, and then a private debugging tool for managed
> > > > code.
> > >
> > > > Details:
> > > > 1. Only ISAPI Filter is guaranteed to be in inetinfo.exe on IIS 5.1.
> > > > ISAPI Extension can be in inetinfo.exe if in Low Isolation Mode, and
> > > > in the Medium/High Isolation Mode, it's in some dllhost.exe. Use
> > > > TLIST.EXE from the Debugging Toolkit to find it. Obviously, you want
> > > > to attach the debugger to the right process executing the ISAPI or
> > > > else no breakpoints get hit. Furthermore, ISAPI Filter DLLs configured
> > > > at the site-level are loaded/unloaded on the fly as needed.
> > >
> > > > Thus, only global ISAPI Filters are guaranteed to be loaded in
> > > > inetinfo.exe by the time you attach debuggers to it from a UI (there
> > > > are ways to attach debuggers ASAP or trigger breakpoints as soon as a
> > > > DLL load, but you are not using those techniques here). Anything else
> > > > MAY be in inetinfo.exe by the time you attach debuggers, but they may
> > > > not be. Hence, I wanted details to confirm.
> > >
> > > > 2. IISRESET will restart all IIS-related processes, so I don't know
> > > > how you can see the Modules page work across IISRESET -- unless Visual
> > > > Studio started auto-re-attaching to processes (which is kinda scary
> > > > behavior, in my mind)
> > >
> > > > 3. Make sure to tell VS where the PDB for the ISAPI DLL is located, or
> > > > put the PDB alongside the DLL
> > >
> > > > //David
> > > >http://w3-4u.blogspot.com
> > > >http://blogs.msdn.com/David.Wang
> > > > //
> > >
> > > > On Nov 1, 10:17 am, Mark <mmodr....DeleteThis@nospam.nospam> wrote:
> > > > > Hi...
> > >
> > > > > Haven't had to debug ISAPIs in a *long* time; this is the first time I've
> > > > > had to do it with the new tools, and I'm seeing weird things, at least
> > > > > compared to VS 2003.
> > >
> > > > > I've got the ISAPIs installed on IIS 5.1.
> > > > > I've attached the debugger to inetinfo.exe.
> > > > > I've got my source loaded with breakpoints set (it let me set the
> > > > > breakpoints, so it seems the symbols are loaded)
> > > > > ...
> > > > > but the breakpoints are never hit.
> > >
> > > > > Another weird thing - If I go to the Modules page, it doesn't show anything
> > > > > on the list unless the module is loaded *while* the Modules page is up. If I
> > > > > iisreset, bring up the modules page, then hit it with a request, a bunch of
> > > > > modules show up. If I close the modules page and reopen it, there's nothing
> > > > > in the list.
> > >
> > > > > Is there any way to get to break points in unmanaged code in VS8?
> > >
> > > > > Thanks
> > > > > Mark
> > >
> > > > > ps Intellisense doesn't seem to work very well for C++ in VS8 either. Kinda
> > > > > surprised me.- Hide quoted text -
> > >
> > > - Show quoted text -
> >
> >
> >
 >> Stay informed about: IIS 5.1/Xp/VS8 debugging ISAPIs 
Back to top
Login to vote
David Wang

External


Since: Nov 01, 2007
Posts: 309



(Msg. 5) Posted: Thu Nov 01, 2007 3:42 pm
Post subject: Re: IIS 5.1/Xp/VS8 debugging ISAPIs [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

And the symbols PDB matches the DLL?

I don't know how to verify that within VS. I can do that with NTSD/
WINDBG.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//






On Nov 1, 3:07 pm, Mark <mmodr... DeleteThis @nospam.nospam> wrote:
> Just a little more info... I used tasklist and saw that the ISAPI dlls are
> indeed loaded, and they are being compiled debug... Still no breaking at
> breakpoints, unfortunately...
>
> Thanks
> Mark
>
>
>
> "Mark" wrote:
> > Hi David...
>
> > I've got them attached to the site, not the global level. I guess I should
> > go try it the other way. I've set break points in every method of the isapi
> > and haven't seen a hit.
>
> > Don't ask me why, but the ISAPI is also instantiating a C# object wrapped in
> > COM; I put breaks in the C# code but those don't get hit either. I can tell
> > from the output, though, that the code is getting run.
>
> > The Modules page in VS8 in under Debug > Windows when you're attached to a
> > process.
>
> > "David Wang" wrote:
>
> > > Hmm, interesting.
>
> > > So, I go and install VS8 on XP Pro to see what's going on when
> > > debugging global ISAPI Filters (standard C++). I followed all your
> > > steps (other than the Modules page -- I know what you are talking
> > > about, but I cannot find it on VS8, so I used TLIST.EXE to give me the
> > > same information), and I actually hit my breakpoint with that request.
>
> > > Can you clarify if you are loading global or site ISAPI Filters?
>
> > > //David
> > >http://w3-4u.blogspot.com
> > >http://blogs.msdn.com/David.Wang
> > > //
>
> > > On Nov 1, 11:26 am, Mark <mmodr... DeleteThis @nospam.nospam> wrote:
> > > > Hi David...
>
> > > > Thank you for your reply. To answer your questions,
> > > > 1. I have 2 ISAPI Filters, the pdbs for both live in the same dir as the
> > > > .dlls.
>
> > > > 2. I have the website in low isolation mode
>
> > > > 3. Sorry for the confusion about the Modules page. I was referring to the
> > > > window between IISRESET and the first request coming in and priming the pump
> > > > with all the late-bound loads. If I
> > > > a. IISRESET
> > > > b. attach inetinfo.exe
> > > > c. open the Modules page (which is empty)
> > > > d. fire a request to the web server
> > > > I will see modules appear on the Modules page as the request is being served
> > > > and programs are being late-loaded.
>
> > > > If I close the Modules page and reopen it, it's empty again.
>
> > > > I've also gone to the Modules page and under Symbol Settings I've manually
> > > > entered the paths to my ISAPI pdb files.
>
> > > > I figure the pdbs must be in there, since it does allow me to set
> > > > breakpoints; they just never get tripped. When the pdbs weren't loaded, it
> > > > wouldn't let me set the breakpoints.
>
> > > > It's a shame if VS8 isn't any good for cpp debugging anymore; VS 2003 was
> > > > great. Using WinDbg just feels like driving a Yugo.
>
> > > > Thanks
> > > > Mark
>
> > > > "David Wang" wrote:
> > > > > First, let's verify some missing details in user configuration that
> > > > > can affect debugging.
>
> > > > > - Where is the PDB for the ISAPI DLL?
> > > > > - Are you talking about ISAPI Extension or ISAPI Filter DLL
> > > > > - What Application Isolation mode is the Default Website using
>
> > > > > Caveat: I do not use any Visual Studio to debug native or managed
> > > > > code, so there may be real oddities in VS8, but let's take care of the
> > > > > user-configuration first. For the curious, I use the NTSD/WINDBG
> > > > > debuggers from Microsoft's Debugging Toolkit for native-code and
> > > > > managed-code interop, and then a private debugging tool for managed
> > > > > code.
>
> > > > > Details:
> > > > > 1. Only ISAPI Filter is guaranteed to be in inetinfo.exe on IIS 5.1.
> > > > > ISAPI Extension can be in inetinfo.exe if in Low Isolation Mode, and
> > > > > in the Medium/High Isolation Mode, it's in some dllhost.exe. Use
> > > > > TLIST.EXE from the Debugging Toolkit to find it. Obviously, you want
> > > > > to attach the debugger to the right process executing the ISAPI or
> > > > > else no breakpoints get hit. Furthermore, ISAPI Filter DLLs configured
> > > > > at the site-level are loaded/unloaded on the fly as needed.
>
> > > > > Thus, only global ISAPI Filters are guaranteed to be loaded in
> > > > > inetinfo.exe by the time you attach debuggers to it from a UI (there
> > > > > are ways to attach debuggers ASAP or trigger breakpoints as soon as a
> > > > > DLL load, but you are not using those techniques here). Anything else
> > > > > MAY be in inetinfo.exe by the time you attach debuggers, but they may
> > > > > not be. Hence, I wanted details to confirm.
>
> > > > > 2. IISRESET will restart all IIS-related processes, so I don't know
> > > > > how you can see the Modules page work across IISRESET -- unless Visual
> > > > > Studio started auto-re-attaching to processes (which is kinda scary
> > > > > behavior, in my mind)
>
> > > > > 3. Make sure to tell VS where the PDB for the ISAPI DLL is located, or
> > > > > put the PDB alongside the DLL
>
> > > > > //David
> > > > >http://w3-4u.blogspot.com
> > > > >http://blogs.msdn.com/David.Wang
> > > > > //
>
> > > > > On Nov 1, 10:17 am, Mark <mmodr... DeleteThis @nospam.nospam> wrote:
> > > > > > Hi...
>
> > > > > > Haven't had to debug ISAPIs in a *long* time; this is the first time I've
> > > > > > had to do it with the new tools, and I'm seeing weird things, at least
> > > > > > compared to VS 2003.
>
> > > > > > I've got the ISAPIs installed on IIS 5.1.
> > > > > > I've attached the debugger to inetinfo.exe.
> > > > > > I've got my source loaded with breakpoints set (it let me set the
> > > > > > breakpoints, so it seems the symbols are loaded)
> > > > > > ...
> > > > > > but the breakpoints are never hit.
>
> > > > > > Another weird thing - If I go to the Modules page, it doesn't show anything
> > > > > > on the list unless the module is loaded *while* the Modules page is up. If I
> > > > > > iisreset, bring up the modules page, then hit it with a request, a bunch of
> > > > > > modules show up. If I close the modules page and reopen it, there's nothing
> > > > > > in the list.
>
> > > > > > Is there any way to get to break points in unmanaged code in VS8?
>
> > > > > > Thanks
> > > > > > Mark
>
> > > > > > ps Intellisense doesn't seem to work very well for C++ in VS8 either. Kinda
> > > > > > surprised me.- Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
 >> Stay informed about: IIS 5.1/Xp/VS8 debugging ISAPIs 
Back to top
Login to vote
David Wang

External


Since: Nov 01, 2007
Posts: 309



(Msg. 6) Posted: Thu Nov 01, 2007 5:44 pm
Post subject: Re: IIS 5.1/Xp/VS8 debugging ISAPIs [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

First, let's verify some missing details in user configuration that
can affect debugging.

- Where is the PDB for the ISAPI DLL?
- Are you talking about ISAPI Extension or ISAPI Filter DLL
- What Application Isolation mode is the Default Website using

Caveat: I do not use any Visual Studio to debug native or managed
code, so there may be real oddities in VS8, but let's take care of the
user-configuration first. For the curious, I use the NTSD/WINDBG
debuggers from Microsoft's Debugging Toolkit for native-code and
managed-code interop, and then a private debugging tool for managed
code.

Details:
1. Only ISAPI Filter is guaranteed to be in inetinfo.exe on IIS 5.1.
ISAPI Extension can be in inetinfo.exe if in Low Isolation Mode, and
in the Medium/High Isolation Mode, it's in some dllhost.exe. Use
TLIST.EXE from the Debugging Toolkit to find it. Obviously, you want
to attach the debugger to the right process executing the ISAPI or
else no breakpoints get hit. Furthermore, ISAPI Filter DLLs configured
at the site-level are loaded/unloaded on the fly as needed.

Thus, only global ISAPI Filters are guaranteed to be loaded in
inetinfo.exe by the time you attach debuggers to it from a UI (there
are ways to attach debuggers ASAP or trigger breakpoints as soon as a
DLL load, but you are not using those techniques here). Anything else
MAY be in inetinfo.exe by the time you attach debuggers, but they may
not be. Hence, I wanted details to confirm.

2. IISRESET will restart all IIS-related processes, so I don't know
how you can see the Modules page work across IISRESET -- unless Visual
Studio started auto-re-attaching to processes (which is kinda scary
behavior, in my mind)

3. Make sure to tell VS where the PDB for the ISAPI DLL is located, or
put the PDB alongside the DLL


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//



On Nov 1, 10:17 am, Mark <mmodr... DeleteThis @nospam.nospam> wrote:
> Hi...
>
> Haven't had to debug ISAPIs in a *long* time; this is the first time I've
> had to do it with the new tools, and I'm seeing weird things, at least
> compared to VS 2003.
>
> I've got the ISAPIs installed on IIS 5.1.
> I've attached the debugger to inetinfo.exe.
> I've got my source loaded with breakpoints set (it let me set the
> breakpoints, so it seems the symbols are loaded)
> ...
> but the breakpoints are never hit.
>
> Another weird thing - If I go to the Modules page, it doesn't show anything
> on the list unless the module is loaded *while* the Modules page is up. If I
> iisreset, bring up the modules page, then hit it with a request, a bunch of
> modules show up. If I close the modules page and reopen it, there's nothing
> in the list.
>
> Is there any way to get to break points in unmanaged code in VS8?
>
> Thanks
> Mark
>
> ps Intellisense doesn't seem to work very well for C++ in VS8 either. Kinda
> surprised me.
 >> Stay informed about: IIS 5.1/Xp/VS8 debugging ISAPIs 
Back to top
Login to vote
Mark

External


Since: Nov 01, 2007
Posts: 9



(Msg. 7) Posted: Thu Nov 01, 2007 5:44 pm
Post subject: Re: IIS 5.1/Xp/VS8 debugging ISAPIs [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi David...

Thank you for your reply. To answer your questions,
1. I have 2 ISAPI Filters, the pdbs for both live in the same dir as the
..dlls.

2. I have the website in low isolation mode

3. Sorry for the confusion about the Modules page. I was referring to the
window between IISRESET and the first request coming in and priming the pump
with all the late-bound loads. If I
a. IISRESET
b. attach inetinfo.exe
c. open the Modules page (which is empty)
d. fire a request to the web server
I will see modules appear on the Modules page as the request is being served
and programs are being late-loaded.

If I close the Modules page and reopen it, it's empty again.

I've also gone to the Modules page and under Symbol Settings I've manually
entered the paths to my ISAPI pdb files.

I figure the pdbs must be in there, since it does allow me to set
breakpoints; they just never get tripped. When the pdbs weren't loaded, it
wouldn't let me set the breakpoints.

It's a shame if VS8 isn't any good for cpp debugging anymore; VS 2003 was
great. Using WinDbg just feels like driving a Yugo.

Thanks
Mark


"David Wang" wrote:

> First, let's verify some missing details in user configuration that
> can affect debugging.
>
> - Where is the PDB for the ISAPI DLL?
> - Are you talking about ISAPI Extension or ISAPI Filter DLL
> - What Application Isolation mode is the Default Website using
>
> Caveat: I do not use any Visual Studio to debug native or managed
> code, so there may be real oddities in VS8, but let's take care of the
> user-configuration first. For the curious, I use the NTSD/WINDBG
> debuggers from Microsoft's Debugging Toolkit for native-code and
> managed-code interop, and then a private debugging tool for managed
> code.
>
> Details:
> 1. Only ISAPI Filter is guaranteed to be in inetinfo.exe on IIS 5.1.
> ISAPI Extension can be in inetinfo.exe if in Low Isolation Mode, and
> in the Medium/High Isolation Mode, it's in some dllhost.exe. Use
> TLIST.EXE from the Debugging Toolkit to find it. Obviously, you want
> to attach the debugger to the right process executing the ISAPI or
> else no breakpoints get hit. Furthermore, ISAPI Filter DLLs configured
> at the site-level are loaded/unloaded on the fly as needed.
>
> Thus, only global ISAPI Filters are guaranteed to be loaded in
> inetinfo.exe by the time you attach debuggers to it from a UI (there
> are ways to attach debuggers ASAP or trigger breakpoints as soon as a
> DLL load, but you are not using those techniques here). Anything else
> MAY be in inetinfo.exe by the time you attach debuggers, but they may
> not be. Hence, I wanted details to confirm.
>
> 2. IISRESET will restart all IIS-related processes, so I don't know
> how you can see the Modules page work across IISRESET -- unless Visual
> Studio started auto-re-attaching to processes (which is kinda scary
> behavior, in my mind)
>
> 3. Make sure to tell VS where the PDB for the ISAPI DLL is located, or
> put the PDB alongside the DLL
>
>
> //David
> http://w3-4u.blogspot.com
> http://blogs.msdn.com/David.Wang
> //
>
>
>
> On Nov 1, 10:17 am, Mark <mmodr... RemoveThis @nospam.nospam> wrote:
> > Hi...
> >
> > Haven't had to debug ISAPIs in a *long* time; this is the first time I've
> > had to do it with the new tools, and I'm seeing weird things, at least
> > compared to VS 2003.
> >
> > I've got the ISAPIs installed on IIS 5.1.
> > I've attached the debugger to inetinfo.exe.
> > I've got my source loaded with breakpoints set (it let me set the
> > breakpoints, so it seems the symbols are loaded)
> > ...
> > but the breakpoints are never hit.
> >
> > Another weird thing - If I go to the Modules page, it doesn't show anything
> > on the list unless the module is loaded *while* the Modules page is up. If I
> > iisreset, bring up the modules page, then hit it with a request, a bunch of
> > modules show up. If I close the modules page and reopen it, there's nothing
> > in the list.
> >
> > Is there any way to get to break points in unmanaged code in VS8?
> >
> > Thanks
> > Mark
> >
> > ps Intellisense doesn't seem to work very well for C++ in VS8 either. Kinda
> > surprised me.
>
>
>
 >> Stay informed about: IIS 5.1/Xp/VS8 debugging ISAPIs 
Back to top
Login to vote
Mark

External


Since: Nov 01, 2007
Posts: 9



(Msg. 8) Posted: Fri Nov 02, 2007 6:24 am
Post subject: Re: IIS 5.1/Xp/VS8 debugging ISAPIs [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

VS will balk when you try to set the breakpoint if the symbol file doesnt
match the binary...

"David Wang" wrote:

> And the symbols PDB matches the DLL?
>
> I don't know how to verify that within VS. I can do that with NTSD/
> WINDBG.
>
>
> //David
> http://w3-4u.blogspot.com
> http://blogs.msdn.com/David.Wang
> //
>
>
>
>
>
>
> On Nov 1, 3:07 pm, Mark <mmodr....DeleteThis@nospam.nospam> wrote:
> > Just a little more info... I used tasklist and saw that the ISAPI dlls are
> > indeed loaded, and they are being compiled debug... Still no breaking at
> > breakpoints, unfortunately...
> >
> > Thanks
> > Mark
> >
> >
> >
> > "Mark" wrote:
> > > Hi David...
> >
> > > I've got them attached to the site, not the global level. I guess I should
> > > go try it the other way. I've set break points in every method of the isapi
> > > and haven't seen a hit.
> >
> > > Don't ask me why, but the ISAPI is also instantiating a C# object wrapped in
> > > COM; I put breaks in the C# code but those don't get hit either. I can tell
> > > from the output, though, that the code is getting run.
> >
> > > The Modules page in VS8 in under Debug > Windows when you're attached to a
> > > process.
> >
> > > "David Wang" wrote:
> >
> > > > Hmm, interesting.
> >
> > > > So, I go and install VS8 on XP Pro to see what's going on when
> > > > debugging global ISAPI Filters (standard C++). I followed all your
> > > > steps (other than the Modules page -- I know what you are talking
> > > > about, but I cannot find it on VS8, so I used TLIST.EXE to give me the
> > > > same information), and I actually hit my breakpoint with that request.
> >
> > > > Can you clarify if you are loading global or site ISAPI Filters?
> >
> > > > //David
> > > >http://w3-4u.blogspot.com
> > > >http://blogs.msdn.com/David.Wang
> > > > //
> >
> > > > On Nov 1, 11:26 am, Mark <mmodr....DeleteThis@nospam.nospam> wrote:
> > > > > Hi David...
> >
> > > > > Thank you for your reply. To answer your questions,
> > > > > 1. I have 2 ISAPI Filters, the pdbs for both live in the same dir as the
> > > > > .dlls.
> >
> > > > > 2. I have the website in low isolation mode
> >
> > > > > 3. Sorry for the confusion about the Modules page. I was referring to the
> > > > > window between IISRESET and the first request coming in and priming the pump
> > > > > with all the late-bound loads. If I
> > > > > a. IISRESET
> > > > > b. attach inetinfo.exe
> > > > > c. open the Modules page (which is empty)
> > > > > d. fire a request to the web server
> > > > > I will see modules appear on the Modules page as the request is being served
> > > > > and programs are being late-loaded.
> >
> > > > > If I close the Modules page and reopen it, it's empty again.
> >
> > > > > I've also gone to the Modules page and under Symbol Settings I've manually
> > > > > entered the paths to my ISAPI pdb files.
> >
> > > > > I figure the pdbs must be in there, since it does allow me to set
> > > > > breakpoints; they just never get tripped. When the pdbs weren't loaded, it
> > > > > wouldn't let me set the breakpoints.
> >
> > > > > It's a shame if VS8 isn't any good for cpp debugging anymore; VS 2003 was
> > > > > great. Using WinDbg just feels like driving a Yugo.
> >
> > > > > Thanks
> > > > > Mark
> >
> > > > > "David Wang" wrote:
> > > > > > First, let's verify some missing details in user configuration that
> > > > > > can affect debugging.
> >
> > > > > > - Where is the PDB for the ISAPI DLL?
> > > > > > - Are you talking about ISAPI Extension or ISAPI Filter DLL
> > > > > > - What Application Isolation mode is the Default Website using
> >
> > > > > > Caveat: I do not use any Visual Studio to debug native or managed
> > > > > > code, so there may be real oddities in VS8, but let's take care of the
> > > > > > user-configuration first. For the curious, I use the NTSD/WINDBG
> > > > > > debuggers from Microsoft's Debugging Toolkit for native-code and
> > > > > > managed-code interop, and then a private debugging tool for managed
> > > > > > code.
> >
> > > > > > Details:
> > > > > > 1. Only ISAPI Filter is guaranteed to be in inetinfo.exe on IIS 5.1.
> > > > > > ISAPI Extension can be in inetinfo.exe if in Low Isolation Mode, and
> > > > > > in the Medium/High Isolation Mode, it's in some dllhost.exe. Use
> > > > > > TLIST.EXE from the Debugging Toolkit to find it. Obviously, you want
> > > > > > to attach the debugger to the right process executing the ISAPI or
> > > > > > else no breakpoints get hit. Furthermore, ISAPI Filter DLLs configured
> > > > > > at the site-level are loaded/unloaded on the fly as needed.
> >
> > > > > > Thus, only global ISAPI Filters are guaranteed to be loaded in
> > > > > > inetinfo.exe by the time you attach debuggers to it from a UI (there
> > > > > > are ways to attach debuggers ASAP or trigger breakpoints as soon as a
> > > > > > DLL load, but you are not using those techniques here). Anything else
> > > > > > MAY be in inetinfo.exe by the time you attach debuggers, but they may
> > > > > > not be. Hence, I wanted details to confirm.
> >
> > > > > > 2. IISRESET will restart all IIS-related processes, so I don't know
> > > > > > how you can see the Modules page work across IISRESET -- unless Visual
> > > > > > Studio started auto-re-attaching to processes (which is kinda scary
> > > > > > behavior, in my mind)
> >
> > > > > > 3. Make sure to tell VS where the PDB for the ISAPI DLL is located, or
> > > > > > put the PDB alongside the DLL
> >
> > > > > > //David
> > > > > >http://w3-4u.blogspot.com
> > > > > >http://blogs.msdn.com/David.Wang
> > > > > > //
> >
> > > > > > On Nov 1, 10:17 am, Mark <mmodr....DeleteThis@nospam.nospam> wrote:
> > > > > > > Hi...
> >
> > > > > > > Haven't had to debug ISAPIs in a *long* time; this is the first time I've
> > > > > > > had to do it with the new tools, and I'm seeing weird things, at least
> > > > > > > compared to VS 2003.
> >
> > > > > > > I've got the ISAPIs installed on IIS 5.1.
> > > > > > > I've attached the debugger to inetinfo.exe.
> > > > > > > I've got my source loaded with breakpoints set (it let me set the
> > > > > > > breakpoints, so it seems the symbols are loaded)
> > > > > > > ...
> > > > > > > but the breakpoints are never hit.
> >
> > > > > > > Another weird thing - If I go to the Modules page, it doesn't show anything
> > > > > > > on the list unless the module is loaded *while* the Modules page is up. If I
> > > > > > > iisreset, bring up the modules page, then hit it with a request, a bunch of
> > > > > > > modules show up. If I close the modules page and reopen it, there's nothing
> > > > > > > in the list.
> >
> > > > > > > Is there any way to get to break points in unmanaged code in VS8?
> >
> > > > > > > Thanks
> > > > > > > Mark
> >
> > > > > > > ps Intellisense doesn't seem to work very well for C++ in VS8 either. Kinda
> > > > > > > surprised me.- Hide quoted text -
> >
> > > > > - Show quoted text -- Hide quoted text -
> >
> > - Show quoted text -
>
>
>
 >> Stay informed about: IIS 5.1/Xp/VS8 debugging ISAPIs 
Back to top
Login to vote
Mark

External


Since: Nov 01, 2007
Posts: 9



(Msg. 9) Posted: Fri Nov 02, 2007 7:56 am
Post subject: Re: IIS 5.1/Xp/VS8 debugging ISAPIs [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Okay, looking at it again this morning,
* tasklist shows that the dlls are loaded

* the symbol files *don't* appear to be loaded, though I don't know why.
The symbol files are in the same directory as the dlls in both cases. In VS
Tools>Options, both of the symbols files are listed in the symbols search path

* the VS8 Modules page only seems to show .Net assemblies loaded. I can't
find any view that show loaded modules in general.

* I set the breakpoints in cpp, then attached to the process, went back to
the files and found the breakpoints disabled because the symbols weren't
loaded.

* I fired up VS8 without a solution and attached to the process. I opened
the source file separately and couldn't set the breakpoints there either...

* Can't find any UI to go and load the symbol files any more in VS8.

Seems like VS8 has removed/demoted a lot of unmanaged debugging features.
Either that or I just can't find them.

Thanks
Mark


"David Wang" wrote:

> And the symbols PDB matches the DLL?
>
> I don't know how to verify that within VS. I can do that with NTSD/
> WINDBG.
>
>
> //David
> http://w3-4u.blogspot.com
> http://blogs.msdn.com/David.Wang
> //
>
>
>
>
>
>
> On Nov 1, 3:07 pm, Mark <mmodr....DeleteThis@nospam.nospam> wrote:
> > Just a little more info... I used tasklist and saw that the ISAPI dlls are
> > indeed loaded, and they are being compiled debug... Still no breaking at
> > breakpoints, unfortunately...
> >
> > Thanks
> > Mark
> >
> >
> >
> > "Mark" wrote:
> > > Hi David...
> >
> > > I've got them attached to the site, not the global level. I guess I should
> > > go try it the other way. I've set break points in every method of the isapi
> > > and haven't seen a hit.
> >
> > > Don't ask me why, but the ISAPI is also instantiating a C# object wrapped in
> > > COM; I put breaks in the C# code but those don't get hit either. I can tell
> > > from the output, though, that the code is getting run.
> >
> > > The Modules page in VS8 in under Debug > Windows when you're attached to a
> > > process.
> >
> > > "David Wang" wrote:
> >
> > > > Hmm, interesting.
> >
> > > > So, I go and install VS8 on XP Pro to see what's going on when
> > > > debugging global ISAPI Filters (standard C++). I followed all your
> > > > steps (other than the Modules page -- I know what you are talking
> > > > about, but I cannot find it on VS8, so I used TLIST.EXE to give me the
> > > > same information), and I actually hit my breakpoint with that request.
> >
> > > > Can you clarify if you are loading global or site ISAPI Filters?
> >
> > > > //David
> > > >http://w3-4u.blogspot.com
> > > >http://blogs.msdn.com/David.Wang
> > > > //
> >
> > > > On Nov 1, 11:26 am, Mark <mmodr....DeleteThis@nospam.nospam> wrote:
> > > > > Hi David...
> >
> > > > > Thank you for your reply. To answer your questions,
> > > > > 1. I have 2 ISAPI Filters, the pdbs for both live in the same dir as the
> > > > > .dlls.
> >
> > > > > 2. I have the website in low isolation mode
> >
> > > > > 3. Sorry for the confusion about the Modules page. I was referring to the
> > > > > window between IISRESET and the first request coming in and priming the pump
> > > > > with all the late-bound loads. If I
> > > > > a. IISRESET
> > > > > b. attach inetinfo.exe
> > > > > c. open the Modules page (which is empty)
> > > > > d. fire a request to the web server
> > > > > I will see modules appear on the Modules page as the request is being served
> > > > > and programs are being late-loaded.
> >
> > > > > If I close the Modules page and reopen it, it's empty again.
> >
> > > > > I've also gone to the Modules page and under Symbol Settings I've manually
> > > > > entered the paths to my ISAPI pdb files.
> >
> > > > > I figure the pdbs must be in there, since it does allow me to set
> > > > > breakpoints; they just never get tripped. When the pdbs weren't loaded, it
> > > > > wouldn't let me set the breakpoints.
> >
> > > > > It's a shame if VS8 isn't any good for cpp debugging anymore; VS 2003 was
> > > > > great. Using WinDbg just feels like driving a Yugo.
> >
> > > > > Thanks
> > > > > Mark
> >
> > > > > "David Wang" wrote:
> > > > > > First, let's verify some missing details in user configuration that
> > > > > > can affect debugging.
> >
> > > > > > - Where is the PDB for the ISAPI DLL?
> > > > > > - Are you talking about ISAPI Extension or ISAPI Filter DLL
> > > > > > - What Application Isolation mode is the Default Website using
> >
> > > > > > Caveat: I do not use any Visual Studio to debug native or managed
> > > > > > code, so there may be real oddities in VS8, but let's take care of the
> > > > > > user-configuration first. For the curious, I use the NTSD/WINDBG
> > > > > > debuggers from Microsoft's Debugging Toolkit for native-code and
> > > > > > managed-code interop, and then a private debugging tool for managed
> > > > > > code.
> >
> > > > > > Details:
> > > > > > 1. Only ISAPI Filter is guaranteed to be in inetinfo.exe on IIS 5.1.
> > > > > > ISAPI Extension can be in inetinfo.exe if in Low Isolation Mode, and
> > > > > > in the Medium/High Isolation Mode, it's in some dllhost.exe. Use
> > > > > > TLIST.EXE from the Debugging Toolkit to find it. Obviously, you want
> > > > > > to attach the debugger to the right process executing the ISAPI or
> > > > > > else no breakpoints get hit. Furthermore, ISAPI Filter DLLs configured
> > > > > > at the site-level are loaded/unloaded on the fly as needed.
> >
> > > > > > Thus, only global ISAPI Filters are guaranteed to be loaded in
> > > > > > inetinfo.exe by the time you attach debuggers to it from a UI (there
> > > > > > are ways to attach debuggers ASAP or trigger breakpoints as soon as a
> > > > > > DLL load, but you are not using those techniques here). Anything else
> > > > > > MAY be in inetinfo.exe by the time you attach debuggers, but they may
> > > > > > not be. Hence, I wanted details to confirm.
> >
> > > > > > 2. IISRESET will restart all IIS-related processes, so I don't know
> > > > > > how you can see the Modules page work across IISRESET -- unless Visual
> > > > > > Studio started auto-re-attaching to processes (which is kinda scary
> > > > > > behavior, in my mind)
> >
> > > > > > 3. Make sure to tell VS where the PDB for the ISAPI DLL is located, or
> > > > > > put the PDB alongside the DLL
> >
> > > > > > //David
> > > > > >http://w3-4u.blogspot.com
> > > > > >http://blogs.msdn.com/David.Wang
> > > > > > //
> >
> > > > > > On Nov 1, 10:17 am, Mark <mmodr....DeleteThis@nospam.nospam> wrote:
> > > > > > > Hi...
> >
> > > > > > > Haven't had to debug ISAPIs in a *long* time; this is the first time I've
> > > > > > > had to do it with the new tools, and I'm seeing weird things, at least
> > > > > > > compared to VS 2003.
> >
> > > > > > > I've got the ISAPIs installed on IIS 5.1.
> > > > > > > I've attached the debugger to inetinfo.exe.
> > > > > > > I've got my source loaded with breakpoints set (it let me set the
> > > > > > > breakpoints, so it seems the symbols are loaded)
> > > > > > > ...
> > > > > > > but the breakpoints are never hit.
> >
> > > > > > > Another weird thing - If I go to the Modules page, it doesn't show anything
> > > > > > > on the list unless the module is loaded *while* the Modules page is up. If I
> > > > > > > iisreset, bring up the modules page, then hit it with a request, a bunch of
> > > > > > > modules show up. If I close the modules page and reopen it, there's nothing
> > > > > > > in the list.
> >
> > > > > > > Is there any way to get to break points in unmanaged code in VS8?
> >
> > > > > > > Thanks
> > > > > > > Mark
> >
> > > > > > > ps Intellisense doesn't seem to work very well for C++ in VS8 either. Kinda
> > > > > > > surprised me.- Hide quoted text -
> >
> > > > > - Show quoted text -- Hide quoted text -
> >
> > - Show quoted text -
>
>
>
 >> Stay informed about: IIS 5.1/Xp/VS8 debugging ISAPIs 
Back to top
Login to vote
David Wang

External


Since: Nov 01, 2007
Posts: 309



(Msg. 10) Posted: Fri Nov 02, 2007 10:32 am
Post subject: Re: IIS 5.1/Xp/VS8 debugging ISAPIs [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hmm, I don't use VS at all so I really can't help on what's available/
not. Could it be that you don't have the Visual C++ portion and its
debugging support installed in VS?

Or maybe when Visual Studio decides to auto-detect whether to do
native or managed code debugging that it somehow does it incorrectly?
(so attach/select manually)

I have C++ and C# installed for VS, and I see the usually expected
debugging support for native code working.

I find that if I attach to inetinfo.exe debugging "Managed code" that
my native code breakpoints do not trigger even though I can set them.

This is looking bizarre. Makes me think we are missing something
obvious.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//





On Nov 2, 7:56 am, Mark <mmodr....TakeThisOut@nospam.nospam> wrote:
> Okay, looking at it again this morning,
> * tasklist shows that the dlls are loaded
>
> * the symbol files *don't* appear to be loaded, though I don't know why.
> The symbol files are in the same directory as the dlls in both cases. In VS
> Tools>Options, both of the symbols files are listed in the symbols search path
>
> * the VS8 Modules page only seems to show .Net assemblies loaded. I can't
> find any view that show loaded modules in general.
>
> * I set the breakpoints in cpp, then attached to the process, went back to
> the files and found the breakpoints disabled because the symbols weren't
> loaded.
>
> * I fired up VS8 without a solution and attached to the process. I opened
> the source file separately and couldn't set the breakpoints there either...
>
> * Can't find any UI to go and load the symbol files any more in VS8.
>
> Seems like VS8 has removed/demoted a lot of unmanaged debugging features.
> Either that or I just can't find them.
>
> Thanks
> Mark
>
>
>
> "David Wang" wrote:
> > And the symbols PDB matches the DLL?
>
> > I don't know how to verify that within VS. I can do that with NTSD/
> > WINDBG.
>
> > //David
> >http://w3-4u.blogspot.com
> >http://blogs.msdn.com/David.Wang
> > //
>
> > On Nov 1, 3:07 pm, Mark <mmodr....TakeThisOut@nospam.nospam> wrote:
> > > Just a little more info... I used tasklist and saw that the ISAPI dlls are
> > > indeed loaded, and they are being compiled debug... Still no breaking at
> > > breakpoints, unfortunately...
>
> > > Thanks
> > > Mark
>
> > > "Mark" wrote:
> > > > Hi David...
>
> > > > I've got them attached to the site, not the global level. I guess I should
> > > > go try it the other way. I've set break points in every method of the isapi
> > > > and haven't seen a hit.
>
> > > > Don't ask me why, but the ISAPI is also instantiating a C# object wrapped in
> > > > COM; I put breaks in the C# code but those don't get hit either. I can tell
> > > > from the output, though, that the code is getting run.
>
> > > > The Modules page in VS8 in under Debug > Windows when you're attached to a
> > > > process.
>
> > > > "David Wang" wrote:
>
> > > > > Hmm, interesting.
>
> > > > > So, I go and install VS8 on XP Pro to see what's going on when
> > > > > debugging global ISAPI Filters (standard C++). I followed all your
> > > > > steps (other than the Modules page -- I know what you are talking
> > > > > about, but I cannot find it on VS8, so I used TLIST.EXE to give me the
> > > > > same information), and I actually hit my breakpoint with that request.
>
> > > > > Can you clarify if you are loading global or site ISAPI Filters?
>
> > > > > //David
> > > > >http://w3-4u.blogspot.com
> > > > >http://blogs.msdn.com/David.Wang
> > > > > //
>
> > > > > On Nov 1, 11:26 am, Mark <mmodr....TakeThisOut@nospam.nospam> wrote:
> > > > > > Hi David...
>
> > > > > > Thank you for your reply. To answer your questions,
> > > > > > 1. I have 2 ISAPI Filters, the pdbs for both live in the same dir as the
> > > > > > .dlls.
>
> > > > > > 2. I have the website in low isolation mode
>
> > > > > > 3. Sorry for the confusion about the Modules page. I was referring to the
> > > > > > window between IISRESET and the first request coming in and priming the pump
> > > > > > with all the late-bound loads. If I
> > > > > > a. IISRESET
> > > > > > b. attach inetinfo.exe
> > > > > > c. open the Modules page (which is empty)
> > > > > > d. fire a request to the web server
> > > > > > I will see modules appear on the Modules page as the request is being served
> > > > > > and programs are being late-loaded.
>
> > > > > > If I close the Modules page and reopen it, it's empty again.
>
> > > > > > I've also gone to the Modules page and under Symbol Settings I've manually
> > > > > > entered the paths to my ISAPI pdb files.
>
> > > > > > I figure the pdbs must be in there, since it does allow me to set
> > > > >