I'm creating a Visual Studio Extension, and would like to see some log output from it for debugging/diagnosing. I have the following code in a MEF IWpfTextViewCreationListener:
ActivityLog = ServiceProvider.GetService(typeof(SVsActivityLog)) as IVsActivityLog;
ActivityLog.LogEntry((UInt32)__ACTIVITYLOG_ENTRYTYPE.ALE_INFORMATION, this.ToString(), "TestMessage");
I ran the extension, breakpoint hit on the LogEntry() call, stepped past it, closed the test instance of Visual Studio, but after that I can only find one ActivityLog.xml in %AppData%\Microsoft\VisualStudio
, and it hasn't been modified since 10 days ago. Where can I find the correct ActivityLog.xml, or what am I missing that's causing it not to be created?
You need to run Visual Studio with the /log switch to create an activity log.