Setting up Symbol Server in Visual Studio involves a lot of clickety-clack:
Go to Tools -> Options -> Debugger -> General.
Uncheck “Enable Just My Code (Managed only)”.
Uncheck “Enable .NET Framework source stepping”. Yes, it is misleading, but if you don't, then Visual Studio will ignore your custom server order (see further on).
Check “Enable source server support”.
Uncheck “Require source files to exactly match the original version”
Go to Tools -> Options -> Debugger -> Symbols.
Select a folder for the local symbol/source cache.
Add symbol servers under “Symbol file (.pdb) locations”.
Is there any way to automate this rigamarole with a simple REG file or somesuch?
Solved now (see how Unplugged does it):
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\Debugger]
"JustMyCode"=dword:00000000
"UseSourceServer"=dword:00000001
"UseDocumentChecksum"=dword:00000001
"SymbolUseMSSymbolServers"=dword:00000000
"FrameworkSourceServerName"="http://referencesource.microsoft.com/symbols"
"PublicSymbolServerName"=""
"PublicSymbolServerName2"=""
"SymbolPath"="http://beta.unpluggedhq.com/symbols"
"SymbolPathState"="1"
"SymbolCacheDir"="c:\symbols"
Related
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.
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:
But in the Express edition, Visual Basic 2005 Express, "Debugging" is not available - only 4 of the 12 are:
However, the 'Just My Code' setting can be changed through the settings file, CurrentSettings.vssettings:
Open the settings file for Visual Basic Express 2005, CurrentSettings.vssettings (see below)
Change the value of JustMyCode from "1" to "0" - replace <PropertyValue name="JustMyCode">1</PropertyValue> with <PropertyValue name="JustMyCode">0</PropertyValue>.
Save the file, but under a different name, like JustMyCodeOff_CurrentSettings.vssettings.
Open Visual Basic 2005 Express.
Open menu Tools -> Import and Export Settings -> Import selected environment settings (the middle option) -> Next.
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).
Press Browse to the new settings file, for example, JustMyCodeOff_CurrentSettings.vssettings.
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
You can choose in option window "Show all settings". Then you will see also debugging options, I guess (I have VB 2010, and here it works this way).
When I debug my ASP.NET webapp in VS2010, a dialog appears with the title "Downloading public symbols".
How do I instruct Visual Studio not to attempt this?
Disable "Enable .net framework source stepping" in Tools → Options → Debugging settings.
You can do this from the Symbols option page
Tools → Options
Go To Debugging → Symbols
Uncheck all of the listed symbol file locations
Also you may want to disable "Enable .net framework source stepping" in Tools → Options → Debugging settings.
From VS Main Menu -> Debug -> Options and Settings
Make sure all the following parameters are configured as follows:
Debugging -> General -> 'Enable Just My Code' is Enabled
Debugging -> General -> 'Enable .NET Framework source stepping' is Disabled (this might occur automatically after setting step 1)
Debugging -> Symbols -> All symbol files locations are unchecked
When I double click an item in the find window, the C/CPP file opens in a tab next to the find window. I want it open in the main window (center) along with the other c/cpp files. Is there a setting to get this behaviour ? Thanks
Perhaps that setting has been modified somewhere. I've tried to reproduce the behaviour in a new(ish) installation of Visual Studio 2010, and can't reproduce. Perhaps you've chosen the C++ Development Settings where the behavior is different from the C# Dev Settings.
Consider resetting your Visual Studio 2010 settings.
Tools -> Import and Export Settings -> Reset All Settings
I have a project with many projects that performs miserably with ReSharper enabled, even on a pretty decent machine (8GB RAM, hybrid solid state hard drive, Core 2 Duo processor).
I was able to find out how to suspend ReSharper, but none of the default key bindings for Visual Studio (e.g. Ctrl-[comma] to navigate to type) seem to be working when I turn ReSharper off.
How do I get back the default key bindings when I disable ReSharper (and get the ReSharper bindings back when I enable ReSharper)?
Prior to resetting the keybindings in VS, export a backup copy of your current ReSharper settings:
Tools -> Options -> Environment -> Import and Export Settings -> rename file to ReSharper.vssettings -> click OK
Then repeat the previous steps but rename it back to CurrentSettings.vssettings.
Next reset the VS keybindings by:
Tools -> Options -> Environment -> Keyboard -> click the Reset button.
That should restore the settings back to the original VS default keyboard bindings and remove all of ReSharper's. (Note this also will remove any custom keybindings that you might have defined unrelated to ReSharper.)
As stated in Warren's answer you could use two VS settings files one of ReSharper and one for (non-ReSharper) default VS and import and load the one as needed.
This could be automated by creating some VS macros:
Public Sub ExportVsSettings()
DTE.ExecuteCommand("Tools.ImportandExportSettings", "-export:c:\MyVSSettings\CurrentSettings.vssettings")
End Sub
Public Sub ImportDefaultVsSettings()
DTE.ExecuteCommand("Tools.ImportandExportSettings", "-import:c:\MyVSSettings\Default.vssettings")
End Sub
Public Sub ImportResharperVsSettings()
DTE.ExecuteCommand("Tools.ImportandExportSettings", "-import:c:\MyVSSettings\ReSharper.vssettings")
End Sub
You can then assign keyboard shortcuts to these macros for ease of use.
Tools menu -> Import and Export Settings... contains the functions you need. You can create separate settings files (.vssettings) for parts of your VS configuration, and then restore them later.
If you want to quickly switch between configurations, ensure that Visual Studio is not running, then go to the user's documents directory, then into the corresponding Visual Studio version directory, then into the Settings directory underneath that. The CurrentSettings.vssettings file is what is loaded by Visual Studio. Substitute that file with another .vssettings file containing the settings you want, and you're good to go.
These .vssettings files are regular XML files, so you could devise a clever little program to rewrite the portions of the files you want to change.
When I hit F12 (or right-click and select Go To Definition) in Visual Studio on code I don't have the source for, it should bring up a generated metadata file. (Very similar to the Code Definition Window)
This doesn't work when ReSharper (R#) is installed. After R# is installed, the Object Browser opens instead.
I've had this problem on several fresh installed computers, and at least since R# 3. (You'll see this works again when you disable R# and restart VS)
How can I get to the metadataview now?
You can change ReSharper's F12 action by going to ReSharper -> Options... -> Tools -> External Sources and changing the order and selection of the External source data providers.
Credit and more details: http://blog.aheil.de/2009/12/27/resharper-5-0-can-visual-studio-2010-metadata-view/