Debug a dll
-
I was trying to debug a dll I made in C# using Visual Studio .NET 2003. I want to be able to walk through the code and use breakpoints and so... I tried using the debug options and I set the debug action to start the program that uses the dll. The program started but it never stopped at the breakpoints. Then I tried to use a MessageBox where I want to set a breakpoint and the program showed the message correctly. I tried to attach to the process in which the host program runs but it failed with the "failed to attach to process" message. Any answers?
-
I was trying to debug a dll I made in C# using Visual Studio .NET 2003. I want to be able to walk through the code and use breakpoints and so... I tried using the debug options and I set the debug action to start the program that uses the dll. The program started but it never stopped at the breakpoints. Then I tried to use a MessageBox where I want to set a breakpoint and the program showed the message correctly. I tried to attach to the process in which the host program runs but it failed with the "failed to attach to process" message. Any answers?
Check your dll project and verify its set to build a Debug version and not a Release version. Moreover, If I'm not mistaken, I think you have to reference the dll the folder it was created in (i.e. < Project dir >\bin\Debug). If you have copied the dll to another location, and your application which uses it, is referencing the new copy at the new location, it probably won't identify your source code. Again... Not sure of it... :doh: Good luck, Shy.