bug in cf?

  • Thread starter Thread starter Jan Hudecek
  • Start date Start date
J

Jan Hudecek

Hello everybody,

sorry for the scandalous subject but i cant help it

i have a code that shows up in reflector like this

public int CurrentQuestion(int index, int otherpeopleindex, bool
onrelations)
{
int num = otherpeopleindex + 1;
if (onrelations)
{
for (int i = 0; i < index; i++)
{
if (this.questionOnRelationsField.IsMap)
{
num++;
}
else
{
num += otherpeopleindex;
}
}
return num;
}
return ((index + 1) + this.QuestionOnRelationsCount);
}


but everytime the function executes, the debugger just steps on the
first line and then immediately returns (even though the code below
sometimes gets executed).
Does anyone know whats going on here?
Thanks,
Jan
 
It might be actually closer to a bug in debugger... when i set
breakpoint at every line i can step through it
weird
 
Is the function returning a value?

What ver of CF and VS are you using?
--
Simon Hart
Visual Developer - Device Application Development MVP
http://www.simonrhart.com

It might be actually closer to a bug in debugger... when i set
breakpoint at every line i can step through it
weird
 
Is the function returning a value?

What ver of CF and VS are you using?
--
Simon Hart
Visual Developer - Device Application Development MVPhttp://www.simonrhart.com


It might be actually closer to a bug in debugger... when i set
breakpoint at every line i can step through it
weird

Hello everybody,
sorry for the scandalous subject but i cant help it
i have a code that shows up in reflector like this
public int CurrentQuestion(int index, int otherpeopleindex, bool
onrelations)
{
int num = otherpeopleindex + 1;
if (onrelations)
{
for (int i = 0; i < index; i++)
{
if (this.questionOnRelationsField.IsMap)
{
num++;
}
else
{
num += otherpeopleindex;
}
}
return num;
}
return ((index + 1) + this.QuestionOnRelationsCount);

but everytime the function executes, the debugger just steps on the
first line and then immediately returns (even though the code below
sometimes gets executed).
Does anyone know whats going on here?
Thanks,
Jan


Are you using the debugger also in other parts of your application? If
not you might have overseen that you are compiling a release build
instead of using the debug configuration. The consequence is that you
won't be able to debug in a meaningful way, since (normally) in
release mode the optimizer does his job...
At least did I wonder about similar effects, too, some time ago and
the problem was solved by "disabling the optimizer.

bye,
Tom
 
Back
Top