Break point

  • Thread starter Thread starter Doug Bell
  • Start date Start date
D

Doug Bell

Hi I am trying to debug a bit of code (while learning .net) and I put in
some break points.

I was surprised to find that the code didn't halt.
On further inspection I noticed that the Break Line inserted a "?" in the
dot in the margin after the code ran.
The "Tool-Tip" says
"The break point will not currently be hit. No symbols have been loaded for
this document."

What does this mean?

Doug
 
Hi Doug,

I assume that you have this problem in an ASP.NET page.
When debuggin ASP.net you'll often see this error. The breakpoint is set
but it claims it won't be hit. Typically this is because there is no code
running at the time. Once you actually are in the cycle of a page request,
the breakpoints should work normally. This is "normal" behavior.

Hope this helps you.

Thanks
Raghavendra
 
Hi Raghavendra,
No it is not ASP. It is a Windows Application written in VB .Net

I can set the Breakpoint but when I run the code, I see the "?" in the brown
dot in the left margin and holding the cursor over it shows the tool tip
with the message. That message is only present after I start the application
and the breakpoint definitely doesn't work.

When I close the form I have a message box asking the User if they want to
save any changes. The message box is openning even if no changes and I am
trying to find out why but the code doesn't halt.

Doug
 
Is this a Release or Debug build?

Doug Bell said:
Hi Raghavendra,
No it is not ASP. It is a Windows Application written in VB .Net

I can set the Breakpoint but when I run the code, I see the "?" in the brown
dot in the left margin and holding the cursor over it shows the tool tip
with the message. That message is only present after I start the application
and the breakpoint definitely doesn't work.

When I close the form I have a message box asking the User if they want to
save any changes. The message box is openning even if no changes and I am
trying to find out why but the code doesn't halt.

Doug
 
Doug,

Just when you set your breakpoint on a Dim or other declaration that has no
code in it.

Dim Doug as String 'here you can not set a breakpoint
Dim Doub as String = "Doug" here you can set a breakpoint.

I hope this helps?

Cor
 
Do you have the contents of the /bin/debug directory stored in VSS or
another version control system? If so, are all the DLL and PDB files
checked out before you compile? Visual studio won't check out the contents
of the /bin/debug directories before the compile takes place, but if these
files are in VSS and not checked out, then the compiler cannot overwrite the
old PDB file with a new one. Therefore, the debugger cannot load the
symbols and debugging stops working.

My suggestion, don't put the PDB file into version control.

I don't know if this will help. The other responders seem to have hit on
all the other solutions I would have thought of. This is the only red
herring that I thought they missed.

Good Luck,
--- Nick
 
Back
Top