I have a Visual studio 2008 solution, with 2 projects. A DLL, A, and a Web application, B.
B has a project reference to A, and A.dll and A.pdb are being copied to B's bin/ directory.
Everything is set to compile in debug mode.
I can run the cassini webserver and debug web application B fine, but when I come to call a method in A.dll, pressing F11 to step into it does not step into it, it steps over it. I want to step into it.
Any ideas why I might not be able to step into the source code of A?
I do not have 'just my code' checked.
I can set a breakpoint in the DLL, and it shows as a red circle (not a hollow one), but it is never hit.
Hmmm... I just altered the code in the DLL which is being called to start with
throw new Exception("Hello");
And I'm not getting an exception. That's pretty suspicious...
Debug from the DLL project Set breakpoints in the DLL project. Right-click the DLL project and choose Set as Startup Project. Make sure the Solutions Configuration field is set to Debug. Press F5, click the green Start arrow, or select Debug > Start Debugging.
To debug a DLL, a calling app must be able to find its . pdb file and any other files the DLL requires. You can create a custom build task to copy the DLL files to your <calling project folder>\Debug output folder, or you can copy the files there manually. Make sure to call the DLL in its correct location.
The most likely problem is that Visual Studio doesn't consider the DLL to be part of "your code". The way to work around this is to disable the "Just My Code" debugging feature.
After doing this you should be able to step into your code without incident.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With