Re: Can't Debug COM Interface



Hello Oleg,



the debugger is set to CLR and Native, if I look into the registry the path
to the DLL is also correct. When I start to debug the application the DLL is
not copied to another location. For testing purposes I wrote in the meantime
a com client in vb.net which is referencing the interface of the COM Server
class. If I use this application as Host application I can debug without
problems. If I'm not including debug info in the client, the same problem,
it's not possible to debug the server application. As the MFC application
also does not include debug symbols I'm not sure if debugging is possible in
this configuration, or should this in general be possible what do you think?



I have another MFC example where I can debug, but that's an MFC exe that
includes a COM Server and not a class library. For debugging I can start the
Project (exe) and then separately start-up the COM client application. If I
invoke functions from the client, I can debug the server.



Maybe I have to do the same in vb.net, so creating a normal exe and add a
COM server interface. But as soon as I change the project from type "class
library" to "windows application", it no longer registers for com interop.
Also if I'm trying to register it manually with regsvr, it fails. Do you
know if it is possible to add a COM server to a vb.net windows application?



Thanks and Regards



Markus




"Oleg Starodumov" <com-dot-debuginfo-at-oleg> schrieb im Newsbeitrag
news:OIowwcEHGHA.3176@xxxxxxxxxxxxxxxxxxxxxxx
>
> Thanks for the information.
>
> Here are the most typical reasons that could cause this behavior:
>
> - Wrong debug engine selected by the debugger (only Native in this case,
> while it should be CLR or both CLR and Native)
> When debugging (_after_ your DLL has been loaded by the process), it can
> be
> checked in Debug | Processes window - select the process and take a look
> at
> Type column (".NET" should be present there). If ".NET" is not there, the
> solution
> depends on the way you start debugging - do you start debugging from
> VB.NET
> component's project (by specifying the client executable in project
> settings) or
> by opening the client application as a separate solution/project?
>
> - COM component (the VB.NET class library) is loaded from an incorrect
> location (e.g. an old version of the component)
> You can check whether the path to the loaded DLL is correct in Modules
> window
> when debugging.
>
> - Symbols get out of sync because of an unexpected rebuild (e.g. when
> starting
> the debugging session from VB.NET project)
> It happens if the DLL is built in one location and then copied into
> another location
> and runs from that another location - the solution is to copy symbols
> (.PDB file)
> together with the DLL.
>
> Oleg
>
>
>
>


.



Relevant Pages

  • Re: QUERY: debugging ASP VBScript
    ... > the web application running and whenever I want to debug I follow these ... >> on the client and the server. ... In order to debug ASP pages, ... you should enable debugging manually on the server ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: QUERY: debugging ASP VBScript
    ... effect to the debugging. ... >> dllhost.exe and click on attach. ... >> the web application running and whenever I want to debug I follow these ... >>> on the client and the server. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: QUERY: debugging ASP VBScript
    ... at a breakpoint. ... > the web application running and whenever I want to debug I follow these ... >> on the client and the server. ... you should enable debugging manually on the server ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Co-worker can debug on server but I cant
    ... Debugging on the server is not the standard modus operandi. ... Remote debugging has been a bear since the ASP days, ... moving to local development, if possible. ... pages while you debug will fire off the debugger. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: QUERY: debugging ASP VBScript
    ... running and whenever I want to debug I follow these steps and when I don't ... > on the client and the server. ... > to debug ASP pages, you should not continue launching the debugger. ... you should enable debugging manually on the server as described ...
    (microsoft.public.dotnet.framework.aspnet)