This page contains tips for better debugging of Concord extensions in particular, and, to some degree at least, Visual Studio all up.
Debugging extensions loaded into msvsmon.exe processesExtensions will load into an msvsmon.exe process if either: (1) they are configured to load into a worker process -or- (2) they are monitor components (components with a component level less than 100,000) and the target process is 64-bit.
The best way to debug these:
If you debug the devenv.exe process with a native debugger and either don't debug msvsmon.exe, or you debug msvsmon.exe with a non-native debugger, and if you sit in break state for more than three minutes msvsmon will timeout and abort. You can work around this problem be either:
-or-
If you have a .csproj as your startup project it is still sometimes useful to launch Visual Studio with native debugging enabled. There are three ways to do this:
Option #1: Enable both managed and native debugging at the same timeRight click on your startup project and bring up project properties. Then switch to the 'Debug' tab and check the 'Enable native code debugging' checkbox. This setting is probably the best option as long as the performance of Visual Studio is acceptable in this mode. Note that if you find things are running too slow, two things that might help in addition to the other options here:
<PropertyGroup>
add:<!-- Enable native-only debugging --> <DebugEngines>{3B476D35-A401-11D2-AAD4-00C04F990171}</DebugEngines>
This approach is best as long as you don't need to debug any managed code running in devenv.exe, and you aren't frequently wanting to switch back and forth between managed-only and native-only debugging.
Option #3: Add a dummy .vcxproj to your solution just for debugging$(DevEnvDir)devenv.exe
/rootsuffix Exp
$(DevEnvDir)
Now you can quickly toggle between managed-only debugging and native-only debugging just by switching your startup project.
If your are managed debugging, there are two Tools->Options->Debugging->General settings that can have a pretty significant impact on debugging experience:
For best performance, you want to leave these in the default state -- Just My Code (JMC) checked, suppress JIT optimizations unchecked. This will also break, by default, if your code raises an exceptions to Visual Studio. This isn't always what you want -- sometimes your extension is probably supposed to throw an exception. But it is usually a good default and you can configure the specific exception types that you don't want to stop on, such as maybe 'NotImplementedException' to stop breaking when the exception is 'User Unhandled'.
If your are investigating a failure that is happening in some other part of Visual Studio it can be useful to temporarily change both of these -- uncheck JMC and check suppress JIT optimizations. Now the output window will show you all the exceptions raised, and you can configure the debugger to break on ones that you think might be causing your problem.
If you haven't already looked at method logs you might want to do so. For some problems, like understanding why your component isn't getting called, logs are better than debugging.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4