Debug.Assert behavioral change VS 2005/2008

  • Thread starter Thread starter Rene
  • Start date Start date
R

Rene

Hi,

Given the following code:

static void Main(string[] args)
{
Debug.Assert(false, "Oopsy");
}

If I run the code above using a computer running Visual Studio 2005, I get
the assert message popup and when I click on the "Retry" button on the
popup message immediately go into debugging mode.

If I do the exact same thing under Visual Studio 2008, I get the assert
popup message but when I click on the "Retry" button I get a message stating
"There is no source code available for the current location." If I then
click the "OK" button on that message box I then enter debugging mode.

The problem here is that I don't think I should be getting the "There is no
source code available for the current location." message box.

Is there something I am doing wrong here? Is this a bug on Visual Studio
2008 or is just some setting that I have to change. Do you guys also
experience the same behavior?

Thank you.
 
Hi,

Given the following code:

static void Main(string[] args)
{
Debug.Assert(false, "Oopsy");

}

If I run the code above using a computer running Visual Studio 2005, I get
the assert message popup and when I click on the "Retry" button on the
popup message immediately go into debugging mode.

If I do the exact same thing under Visual Studio 2008, I get the assert
popup message but when I click on the "Retry" button I get a message stating
"There is no source code available for the current location." If I then
click the "OK" button on that message box I then enter debugging mode.

The problem here is that I don't think I should be getting the "There is no
source code available for the current location." message box.

Is there something I am doing wrong here? Is this a bug on Visual Studio
2008 or is just some setting that I have to change. Do you guys also
experience the same behavior?

Thank you.

If you are in Release mode, try going to Tools...Options and
unclicking "Warn if no user code".
 
Back
Top