Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

debugger--won't stop at breakpoints

Status
Not open for further replies.

mHos

Programmer
Mar 3, 2003
19
US
I am creating a VB.NET dll. I have created a form and set several breakpoints. It will stop at some of the breakpoints, and not at others.

I have checked that debugging is enabled, several times i've deleted the entire \bin folder, forcing it to recreate itself, restarted my machine, etc. And nothing seems to work. It occassionally will stop at the breakpoints, but most of the time it won't. I even tried to force a breakpoint by hardcoding it-- System.Diagnostics.Debugger.Break()

that just results in a message box popping up and saying that "There is no source code available" .

If you have any other ideas, please let me know.
thanks.
 
I have it set through the configuration to start and external .exe on startup that my dll links into. I have multiple forms in this dll and the breakpoints work correctly everytime in all the other forms, but not in this one. I have even tried creating a new form and copying my code over, but that isn't working either. It'll only stop at my breakpoints the first time through on the form, and not again.

If you have anymore ideas, i'd appreciate it.
Thanks
 
I've had the same problem twice. After a lot restarts of visual studio and the computer it started working again both times..
/icca /icca
 
icca--

thanks for letting me know that I'm not the only one. I'll keep trying to get it to work. Right now, debug.writeline will have to become my best friend!!
 
Make sure you have the Project Configuration Manager set to build a "Debug" application. That's under Build, Configuration Manager, Configuration.

Once you've set this to Debug save your application, select Build, Build Solution, then try with your breakpoints.

Hope this helps.

O.
 
Also, your form must be referrencing your dll. Assuming you are working with your form project and dll project as part of one project (called a project group in VB6) you must remember to remove and re-add your dll as a referrence when changes are made (to the dll project).

You have to build the dll (compile the dll), remove the referrence from the form project, and add the new dll back to the form. When you attached the dll to the form project originally NET copied the dll to the form project BIN directory. As long as the dll code and copy in BIN are the same it should hit your breakpoints.

O.
 
This was addressed in SP1, I think. Make sure you have the latest servicepack for .NET Framework 1.0 applied.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top