How to Disable “Just My Code” in Visual Studio 2005

Developers using Visual Studio 2005, especially those switching from Visual Studio .NET, will probably know that Visual Studio 2005 hides code produced in Design mode automatically. Although on Microsoft’s site this feature is called “Just My Code,” there is no reference to that phrase anywhere in the UI that I could tell.

I couldn’t find a solution on the Internet that worked, and I finally figured it out on my own. I thought I’d publish it here in case anyone else had the same problem. It’s really simple: just click View, then click Show All Files. In the Solution Explorer pane, a plus sign will appear next to Windows forms. Just click on the plus sign, then double-click on <formname>.Designer.vb (replacing <formname> with the form name, of course).

(FYI: Note that I found conflicting instructions on the Internet that said the option to disable Just My Code was in the Options dialog box. Perhaps that was only applicable to beta versions of Visual Studio 2005, or perhaps my solution only works with the Express Editions.)

Was this post helpful? Share it!

8 Comments

  1. Josh Dannemann

    If you happen to be missing the option to diable Just My code, there is another round about way of doing it.

    1. Open the settings File for VB Express 2005:
    Visual Studio 2005SettingsVB ExpressCurrentSettings.vssettings

    2. Find This line of text:
    1

    3. Change it to:
    0

    4. Save the file, but under a different name like:
    Visual Studio 2005SettingsVB ExpressMySettings.vssettings

    5. Open VB Express 2005 Click Tools > Import and Export Settings > Import Selected Environment Settings > Next

    6. Choose “No, just import new settings overwriting my current” > Next

    7. Choose MySettings.vssettings or browse to it.

    8. Finish.

    After this, Just my Code should be disabled and you may debug whatever you wish to.

  2. Josh Dannemann

    Uh.. Steps 1 and two are supposed to read

    Change “”1″”
    To “”0″”

  3. Josh Dannemann

    The code cleaner in this reply form appears to be deleting the code I’m putting in. Just find the property value named “justmycode” and change the 1 to a zero.

  4. Hi Josh,
    Sorry the code cleaner gave you trouble. Thanks for posting the tip!
    - John

  5. Josh Dannemann

    NP ;0)

  6. Muhammad aamir

    Hi,
    justmycode is 0, but still I am unable to debug the code.
    Remeber that this problem comes when you are converting VB6 code to .NET

  7. Josh Dannemann

    @Muhammad aamir

    You might want to check if there is more than one reference to justmycode. Using the windows search dog (search champion) search all directories for *.vssettings and once found, change the value within each for JustMyCode to 0. I would say to go ahead and import new settings, but no need for convoluted instructions. If every settings file is changed and you still have justmycode enabled, then something else must going on.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>