Skip to content

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

by John Lamansky on March 6th, 2006

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

From → Tips

7 Comments
  1. Josh Dannemann permalink

    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 2005\Settings\VB Express\CurrentSettings.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 2005\Settings\VB Express\MySettings.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 permalink

    Uh.. Steps 1 and two are supposed to read

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

  3. Josh Dannemann permalink

    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 permalink

    NP ;0)

  6. Muhammad aamir permalink

    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

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS