Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / General / April 2006

Tip: Looking for answers? Try searching our database.

Breakpoint does not get hit in different assembly

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bob Bryan - 27 Apr 2006 13:25 GMT
I am using VS.NET 2005 standard edition on a single cpu desktop.  I am using
a console app to test out a C# assembly that I have written.  When I set a
breakpoint inside the assembly, and let it run, the breakpoint does not get
hit.  I can step inside the function that is getting called in the assembly
just fine and when I press F5, the breakpoint is then hit.

Is there some sort of setting that I need to make?  I know that in VS 6.0 I
had to specify the DLLs that were being debugged under project settings in
order for a breakpoint in a DLL to be hit.  This seems to be a similar
problem.

I have verified that both my console app and assembly are in debug and that
the pdb and dll files for the assembly have been properly copied to the
console app's debug folder.

Any ideas what the problem is?
Carlos J. Quintero [VB MVP] - 27 Apr 2006 14:06 GMT
Hi Bob,

Try this:

1) Create a C# Class Library project with a Class1 class and a Test
subroutine
2) Add to the solution a new C# console application.
3) In the References node of this Console application, add a Project
Reference (not .NET reference!) to the Class Library project.
4) In the Main method, create an instance of Class1 and call its Test method
5) Set a breakpoint on the Test method
6) Ensure that the console app is the startup project and run the project.
The breakpoint should be hit.

Signature

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com

>I am using VS.NET 2005 standard edition on a single cpu desktop.  I am
>using a console app to test out a C# assembly that I have written.  When I
[quoted text clipped - 12 lines]
>
> Any ideas what the problem is?
Bob Bryan - 27 Apr 2006 22:23 GMT
Hi Carlos,

Your solution worked and the breakpoint is now getting hit.  Thanks very
much.  Just to spell out in a little more detail for others looking to solve
the same problem:

1. In Solution Explorer right click the console app (or the app that is
calling functions in some other class assembly) and select Properties.  This
should bring up the project properties on the left side of the screen.  You
should see options on the left hand side like Application, Build Events,
Debug, ..., Reference Paths, etc.
2. Click on Reference Paths.
3. Under "Folder:", enter the path of the debug version of the assembly to
be debugged.  The path should probably end with something like
\YourAssembly\bin\Debug\.
4. Click the Add Folder button.

> Hi Bob,
>
[quoted text clipped - 27 lines]
>>
>> Any ideas what the problem is?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.