Debugging a DLL project in Visual Studio 2008 using a process application

I am developing a DLL using C # .NET 2.0 and Visual Studio 2008 Professional. I would like to debug (i.e. Set a breakpoint) using Attach to Process and attaching it to the application executable. I think it works; at least i am not getting any error messages. However, any breakpoints I am trying to set are disabled with a small warning message that says: "At the moment, the breakpoint will not be deleted. No characters have been loaded for this document." Any thoughts on how I can get debugging with the work of breakpoints would be greatly appreciated. Unfortunately, I cannot just launch the application from VS due to the complex nature of its installation process; I need to somehow connect the DLL to the installed executable (I can disable the file if necessary) and debug using checkpoints. Thanks.

+2
source share
2 answers

Make sure you have the debug version of the code you are trying to connect to. If this is a release version without pdb files, you will receive an error message that you describe. Also make sure that you have the correct type selected in the "Attach to" selector. The selector must be set to โ€œAutomaticโ€ or โ€œControlโ€.

Enjoy it!

+3
source

If you are sure that you have a debug assembly, and the source code corresponds to the assembly you are connecting to, then check the Debug - Windows - Modules window and check all places for debugging the assembly, their versions and pdb. This will help you narrow down the problem.

+1
source

All Articles