Break Point

G

Guest

I have a couple of questions about break points. I have this one ASPX page
which had a breakpoint set on a particular line and I am unable to get rid of
it. If I look at the line in which the break is occuring, there is no
visible sign that a breakpoint is set. But as soon as I run the program, it
always stops on that line. This started happening after I moved the screen
to a different folder, not sure if this has anything to do with it. How to I
get rid of the breakpoint?

2nd question on conditional breakpoints. I have a break point set on a line
which looks like the following:
string fielda = dr["myField"].ToString();
When I right click on that line and select Breakpoint properties ,how do I
properly set up a condition of ... fielda = "Fred" ? I have tried setting
the condition to "Fred" and "fielda = "Fred", but none of those do the
trick. What am I missing on setting conditional breakpoints?
 
K

Kevin Spencer

I have a couple of questions about break points. I have this one ASPX
page
which had a breakpoint set on a particular line and I am unable to get rid of
it. If I look at the line in which the break is occuring, there is no
visible sign that a breakpoint is set. But as soon as I run the program, it
always stops on that line. This started happening after I moved the screen
to a different folder, not sure if this has anything to do with it. How to I
get rid of the breakpoint?

Chances are, it's breaking due to an exception occurring. Check under your
Debug|Exceptions tool.
2nd question on conditional breakpoints. I have a break point set on a line
which looks like the following:
string fielda = dr["myField"].ToString();
When I right click on that line and select Breakpoint properties ,how do I
properly set up a condition of ... fielda = "Fred" ? I have tried setting
the condition to "Fred" and "fielda = "Fred", but none of those do the
trick. What am I missing on setting conditional breakpoints?

The condition must evaluate to true or false. Try using:

fielda == "Fred" (doubled equals signs)

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

Jim Heavey said:
I have a couple of questions about break points. I have this one ASPX page
which had a breakpoint set on a particular line and I am unable to get rid of
it. If I look at the line in which the break is occuring, there is no
visible sign that a breakpoint is set. But as soon as I run the program, it
always stops on that line. This started happening after I moved the screen
to a different folder, not sure if this has anything to do with it. How to I
get rid of the breakpoint?

2nd question on conditional breakpoints. I have a break point set on a line
which looks like the following:
string fielda = dr["myField"].ToString();
When I right click on that line and select Breakpoint properties ,how do I
properly set up a condition of ... fielda = "Fred" ? I have tried setting
the condition to "Fred" and "fielda = "Fred", but none of those do the
trick. What am I missing on setting conditional breakpoints?
 

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

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,197
Latest member
Sean29G025

Latest Threads

Top