Debug.Assert behavioral change VS 2005/2008

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.
 
H

harborsparrow

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".
 

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

Top