Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

VS2005-Debug options

Posted on 2011-09-13
5
Medium Priority
?
251 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
  • 2
  • 2
5 Comments
 
LVL 10

Accepted Solution

by:
Mez4343 earned 1000 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 1000 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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

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.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Integration Management Part 2
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

927 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