Solved

VS2005-Debug options

Posted on 2011-09-13
5
246 Views
Last Modified: 2012-05-12
My VS2005 solution contains localhost website (File--> New---> Web Site) which uses MyDll.dll (written in C#)
I would like to debug my Web-site (which calls the method from MyDLL)and debug the code in MyDll.dll when execution goes thru
MyDll. I know that I can add project containing MyDll files (C# class) to the solution - it will allow me to debug As described above.
MY questions is: Is it possibe to debug (to step thru lines of code in my Web-site and MyDll when execution goes thru MyDll) Without Adding project containing MyDll files (C# class) to the solution??
0
Comment
Question by:niceguy971
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 10

Accepted Solution

by:
Mez4343 earned 250 total points
ID: 36533188
see this http://stackoverflow.com/questions/1130417/how-to-debug-a-referenced-dll

If your trying to debug a dll file without a having all the source code, you will need the debugging symbols (the "pdb" file) to be in the same folder as the dll. Check that your projects are generating debug symbols (project properties => Build => Advanced => Output / Debug Info = full); and if you have copied the dll, put the pdb with it.

 
0
 
LVL 40
ID: 36533654
Yes, but you have to set a reference to the source code instead of using a reference to the dll as you usually do.

Add your dll project to you ASP.NET application with File...Add...Existing project.

In the ASP project, go to the Reference window, but instead of adding the reference from the .NET or Browse tab, add it from the Project tab. You will thus reference the source code. If debugging is enabled for the dll project (as explained by Mez4343), you will be able to set breakpoint and move step by step into as if the ASP and dll projects where only one.
0
 

Author Comment

by:niceguy971
ID: 36539385
So If I added before the DLL reference from the  Browse tab..Does It Mean I need to delete

the DLL reference and Add Project reference from the Project tab??
0
 
LVL 40

Assisted Solution

by:Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger) earned 250 total points
ID: 36539651
Yes.

You cannot have two references to the same project. The compiler would not know which one to use.
0
 

Author Closing Comment

by:niceguy971
ID: 36945654
Thanks
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question