Can't set breakpoints

T

Tom Edelbrok

I have a VB.NET program running under VS2003. It is just a simple program
for learning VB.NET, with a main form and a form load event. Inside the form
load event I set a breakpoint. However, every time I press F5 to run the
program the breakpoint displays a question mark glyph in the left hand side
of the source window, and the breakpoint gets completely ignored (ie: my
form is displayed without the program stopping in the form load event as
desired).

In the VB.NET documentation for breakpoints it says that a 'question mark'
glyph means that the code isn't loaded, so a breakpoint can't be activated.

Should I not be able to set a breakpoint in a simple form load event in
VB.NET?

Thanks for help in advance,

Tom
 
C

Cor Ligthert

Tom,

You can only set a breakpoint on real code and therefore not on
dim a as integer
however on
dim a as integer = 1
it can.

In the first situation a question mark will be set.

I hope this helps,

Cor
 
T

Tom Edelbrok

Yes, I understand, but the code I'm setting the breakpoint on (in the form
load event) is any generic code, not a DIM statement. For example, if I set
a breakpoing on "I = I + 1" or "Call mysub(X,Y,Z)", etc. It seems that any
line of code in the form load event yields a question mark glyph in the
breakpoint, and as a result the breakpoint gets ignored.

Tom
 
H

Herfried K. Wagner [MVP]

Tom Edelbrok said:
I have a VB.NET program running under VS2003. It is just a simple program
for learning VB.NET, with a main form and a form load event. Inside the
form load event I set a breakpoint. However, every time I press F5 to run
the program the breakpoint displays a question mark glyph in the left hand
side of the source window, and the breakpoint gets completely ignored (ie:
my form is displayed without the program stopping in the form load event as
desired).

Select "Debug" from the "Solution configuration" combobox which is embedded
into VS.NET's toolbar. If the project/solution is compiled using the
"Release" configuration, no debug symbols (PDB files) are created. Use this
configuration when compiling the release version of a product. If this
doesn't fix your problem, delete its "obj" and "bin" directories and
recompile.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top