Home All Groups Group Topic Archive Search About

Can't set breakpoints

Author
11 Apr 2005 4:53 PM
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

Author
11 Apr 2005 5:03 PM
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
Author
11 Apr 2005 5:19 PM
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





Show quoteHide quote
"Cor Ligthert" <notmyfirstn***@planet.nl> wrote in message
news:OYvr%23hrPFHA.3988@tk2msftngp13.phx.gbl...
> 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
>
Author
11 Apr 2005 5:51 PM
Herfried K. Wagner [MVP]
"Tom Edelbrok" <anonym***@anonymous.com> schrieb:
>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.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
11 Apr 2005 5:58 PM
Tom Edelbrok
That was the problem. Thank you very much.

Tom



Show quoteHide quote
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:uTh0e8rPFHA.1528@TK2MSFTNGP09.phx.gbl...
> "Tom Edelbrok" <anonym***@anonymous.com> schrieb:
>>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.
>
> --
> M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
> V B   <URL:http://classicvb.org/petition/>