提交 96221193 编写于 作者: T Tomas Matousek

Add telemetry

上级 5a2f43a0
......@@ -4,10 +4,11 @@
namespace Microsoft.CodeAnalysis.EditAndContinue
{
internal class EncDebuggingSessionInfo
internal sealed class EncDebuggingSessionInfo
{
public readonly List<EncEditSessionInfo> EditSessions = new List<EncEditSessionInfo>();
public int EmptyEditSessions;
public int EmptyEditSessions { get; private set; }
public bool ReadOnlyEditAttemptedProjectNotBuiltOrLoaded { get; private set; }
internal void EndEditSession(EncEditSessionInfo encEditSessionInfo)
{
......@@ -20,5 +21,10 @@ internal void EndEditSession(EncEditSessionInfo encEditSessionInfo)
EditSessions.Add(encEditSessionInfo);
}
}
internal void LogReadOnlyEditAttemptedProjectNotBuiltOrLoaded()
{
ReadOnlyEditAttemptedProjectNotBuiltOrLoaded = true;
}
}
}
......@@ -17,6 +17,7 @@ internal static class DebugLogMessage
private const string SessionCount = nameof(SessionCount);
private const string EmptySessionCount = nameof(EmptySessionCount);
private const string ReadOnlyEditAttemptedProjectNotBuiltOrLoaded = nameof(ReadOnlyEditAttemptedProjectNotBuiltOrLoaded);
private const string HadCompilationErrors = nameof(HadCompilationErrors);
private const string HadRudeEdits = nameof(HadRudeEdits);
......@@ -61,6 +62,7 @@ private static void CreateSessionKeyValue(Dictionary<string, object> map, int se
map[SessionId] = sessionId;
map[SessionCount] = session.EditSessions.Count;
map[EmptySessionCount] = session.EmptyEditSessions;
map[ReadOnlyEditAttemptedProjectNotBuiltOrLoaded] = session.ReadOnlyEditAttemptedProjectNotBuiltOrLoaded;
}
private static void CreateSessionEditKeyValue(Dictionary<string, object> map, int sessionId, int editSessionId, EncEditSessionInfo editSession)
......
......@@ -175,6 +175,8 @@ internal bool OnEdit(DocumentId documentId)
Environment.NewLine +
"'Lightweight solution load' is enabled for the current solution. " +
"Disable it to ensure that all projects are loaded when debugging starts.";
s_encDebuggingSessionInfo?.LogReadOnlyEditAttemptedProjectNotBuiltOrLoaded();
}
else
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册