Did you know… What warning message is suppressed by the Warn If No User Code On Launch option? – #291


Continuing the discussion around Just My Code, you may have noticed on the Tools-Options-Debugging-General page the checkbox “Warn if no user code on launch” and might be wondering how to get into this state.

image

Let’s say in your solution you have a console application that is both optimized and is set to be the startup project, and you have a class library that isn’t optimized, so it is considered to be your code.  Have the console application call a method in the class library, just so that you can set a breakpoint in the class library.

When you hit F5, the following warning message will appear.

image

If you uncheck the “Warn if no user code on launch”, this message goes away. Regardless whether this checkbox is set, your breakpoint in the class library hits, because that is still your code.

Technorati Tags: VS2005Tip,VS2008Tip

Skip to main content