Reputation:
I have a classic ASP website running on IIS. The site uses some COM objects (via VBScript CreateObject), which actually are .DLL's written in C#. So the question is how can I debug the C# code in Visual Studio 2017?
I tried to attach to a process w3wp.exe, but it does not show any DLL's, just script code:
My PDB files are placed in the same folder as the DLL's and I also unchecked "Just my code", but nothing helps. Since no dlls loaded, no symbols loaded my breakpoints do not hit
Upvotes: 2
Views: 1545
Reputation: 627
Did you tried attaching the w3wp.exe
in your C# application
? you can open that C# application
and make sure that outout of that application is the DLL
which is referenced there and put breakpoint on the method which you want to debug, while attaching the debugger
, the output window
itself can tell you whether the right symbols
are loaded or not, if it says symbols
are loaded then breakpoint
will hit.
Give it a try it should work as i've faced this previously.
Upvotes: 0
Reputation: 16680
If you are attaching the debugger to a Classic ASP Web Application you need to make sure that you tell it that you want to debug managed code as well.
In the Attach to Process
window before selecting the process to attach to, locate the Select...
option to the right of the Attach to:
label;
This will open the Select Code Type
window where you can select the code type debuggers to attach.
Select multiple code types from those listed, specifically the Managed
version of .Net that fits the compilation of the .Net COM DLL you wish to debug.
Attach to the process as normal.
Upvotes: 2