How do I disable 'Just My Code' in Visual Basic 2005 Express?

Peter Mortensen picture Peter Mortensen · Oct 9, 2012 · Viewed 7.5k times · Source

How do I disable 'Just My Code' in Visual Basic 2005 Express?

It is supposed to be in menu Tools -> Options -> Debugging -> Enable Just My Code, but I can't find it.

Answer

Peter Mortensen picture Peter Mortensen · Oct 9, 2012

This option is not available in Visual Studio itself for most Express editions (it is in Visual C# 2010 Express, though). For instance, in Visual Studio 2008 the options dialog is:

Options dialog for Visual Studio 2008

But in the Express edition, Visual Basic 2005 Express, "Debugging" is not available - only 4 of the 12 are:

Options dialog for Visual Studio 2008

However, the 'Just My Code' setting can be changed through the settings file, CurrentSettings.vssettings:

  1. Open the settings file for Visual Basic Express 2005, CurrentSettings.vssettings (see below)
  2. Change the value of JustMyCode from "1" to "0" - replace <PropertyValue name="JustMyCode">1</PropertyValue> with <PropertyValue name="JustMyCode">0</PropertyValue>.
  3. Save the file, but under a different name, like JustMyCodeOff_CurrentSettings.vssettings.
  4. Open Visual Basic 2005 Express.
  5. Open menu Tools -> Import and Export Settings -> Import selected environment settings (the middle option) -> Next.
  6. Choose “No, just import new settings, overwriting my current” -> Next (as we already have a backup copy in the old file that we didn't touch).
  7. Press Browse to the new settings file, for example, JustMyCodeOff_CurrentSettings.vssettings.
  8. Press Next and Finish.

Note that the line in the settings file containing "Just My Code" is extremely long, more than 200,000 characters, and not all text editors are able to handle it. The safe option may be to use a hex editor to change "1" to "0".

A common location of CurrentSettings.vssettings is:

C:\Documents and Settings\SomeUser\My Documents\Visual Studio 2005\Settings\VB Express\CurrentSettings.vssettings

Other settings for the debugger are:

  • ConfirmDeleteAllBreakpoints
  • StopAllProcesses
  • StopOnExceptionCrossingManagedBoundary
  • EnableAddressLevelDebugging
  • ShowDisassemblyWhenNoSource
  • EnableBreakpointConstraints
  • UseExceptionHelper
  • AutoUnwindOnException
  • JustMyCode
  • ShowNonPublicMembers
  • WarnIfNoUserCodeOnLaunch
  • AllowImplicitFuncEval
  • AllowToString
  • UseSourceServer
  • ShowSourceServerDiagnostics
  • AlwaysColorMarkerText
  • UseDocumentChecksum
  • OutputToImmediate
  • ShowRawStructures
  • DisableJITOptimization
  • ShowNoSymbolsDialog
  • HexDisplay
  • HexInput
  • AddUnmappedBreakpointAtMappedLocation
  • StepIntoOnRestart
  • ENCEnable
  • ENCApplyChangesOnContinue
  • ENCWelcome
  • ENCStaleCodeWarning
  • ENCPrecompile
  • ENCRelink
  • NOENCAllowEdits
  • NOENCIgnore
  • NOENCRebuild
  • ConfirmFoundFiles
  • DisasmLineNumbers
  • ModulesShowAll
  • UseCodeSense
  • DisasmFields
  • CallStackViewOptions
  • ShowExternalCode
  • SourceStepUnit
  • DisasmStepUnit
  • CrossThreadCallStack
  • SaveRemoteDumps
  • LongEvalTimeout
  • NormalEvalTimeout
  • QuickwatchTimeout
  • DataTipTimeout
  • AutosReturnValsTimeout
  • AutosRegistersTimeout
  • LocalsTimeout
  • RegistersTimeout
  • AddressExpressionTimeout
  • ScriptDocsTimeout
  • ImmediateWindowTimeout
  • SetValueTimeout
  • ShowNonprintableCharsAsGlyphs
  • ShowSystemProcesses
  • ShowProcessesFromAllSessions
  • EnhancedDataTips
  • UserSpecifiedEngines
  • OutputOnException
  • OutputOnModuleLoad
  • OutputOnModuleUnload
  • OutputOnModuleSymbolSearch
  • OutputOnProcessDestroy
  • OutputOnThreadDestroy
  • OutputOnOutputDebugString
  • OutputOnDebuggerMessage
  • VariableWindowIcons
  • DisableAttachSecurityWarning
  • LoadDllExports
  • NativeRPC
  • AllowSideEffectEval
  • EnableWatchTipBar
  • AutoLoadFromSymbolPath
  • LoadSymbolsWhenSettingsChanged
  • OneClickEdit
  • OfferArrayExpansion
  • VariableWindowPromptOnLargeExpansion
  • VariableWindowMaxSupportedChildren
  • PromptToAddSourceToIgnoreList
  • SourceServerExtractToDirectory
  • DefaultTracepointMessage
  • ProgramToDebugPath
  • AttachToProcessDefaultEngineList
  • SecureSourceLocalDirectory
  • SymbolPath
  • SymbolPathState
  • SymbolCacheDir