Solved

VS2005-Debug options

Posted on 2011-09-13
5
242 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

756 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