How can I remove JetBrains.Application.ShellTraceListener

I'm building a Visual Studio Package so I'm using Visual Studio to debug Visual Studio.  However the default trace listener is JetBrains.Application.ShellTraceListener.  This eats Debug.Assert and never brings up a message box.  I never see any asserts.  How can I remove this listener?  Can I remove it from the Exp hive and not the normal hive?

Update: It looks like JetBrains.Application.ShellBase.Init_DebugListeners is calling Debug.Listeners.Remove("Default").

Is there a way to stop this behavior or tell the ShellTraceListener to display dialogs as the DefaultTraceListenerDoes?

1 comment
Comment actions Permalink

Hello,

I'm building a Visual Studio Package so I'm using Visual Studio to
debug Visual Studio.  However the default trace listener is
JetBrains.Application.ShellTraceListener.  This eats Debug.Assert and
never brings up a message box.


As far as I remember, this behavior was introduced to avoid unexpected Assert
dialogs, increase the application stability, and intercept all of the R#-related
assertions to submit them to the R# Issue Tracker. If you're using a Production-flavor
build, most of the errors are just ignored. Installing a Development build
of the same version will switch the behavior so that any asserts that might
be related to ReSharper are shown in the ReSharper exception reporter dialog.
There is no setting to turn off the R# Debug.Assert listener.

I never see any asserts.  How can I
remove this listener?


Same way we do -- by using the Debug.Listeners collection.

Can I remove it from the Exp hive and not the
normal hive?


In VS 8-9, ReSharper is only installed into the main hive, so you won't have
any side-effects in any experimental hives. In VS10, the hives infrastructure
has been changed, and ReSharper becomes automatically visible to all hives.
It's still possible to constrain it to the main hive by following the instructions
in the "Please install R# as a pkgdef file for VS2010" thread in the EAP
group (news://news.intellij.net/16458688.67081284574510857.JavaMail.devnet@domU-12-31-39-18-36-57.compute-1.internal).

Still, for the needs of Debug.Assert, I think it would be sufficient to suspend
R# in the secondary hive (http://confluence.jetbrains.net/display/ReSharper/SuspendReSharper5inVisual+Studio)
without actually removing it.


Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”


0

Please sign in to leave a comment.