Skip to content
This repository was archived by the owner on Jun 11, 2026. It is now read-only.

Commit 2443d09

Browse files
author
Priyan Vaithilingam
committed
Minor changes in VS Operations
1 parent 80828fd commit 2443d09

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

src/VisualStudio/CodeTalk/Talkpoints/ExpressionTalkpoint.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ public ExpressionTalkpoint(string filePath, CursorPos position, bool doesContinu
1818
public override void Execute()
1919
{
2020
if (string.IsNullOrEmpty(expression)) { return; }
21-
var exp = TalkCodePackage.vsOperations.RunExpressionInDebugger(expression);
22-
if (exp.IsValidValue)
21+
var expResult = TalkCodePackage.vsOperations.RunExpressionInDebugger(expression);
22+
if (!string.IsNullOrEmpty(expResult))
2323
{
24-
TextToSpeech.SpeakText(exp.Value);
24+
TextToSpeech.SpeakText(expResult);
2525
}
2626
}
2727
}

src/VisualStudio/CodeTalk/VSOperations.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,14 @@ public void BreakHandler(dbgEventReason reason, ref dbgExecutionAction execActio
122122

123123
}
124124

125-
public EnvDTE.Expression RunExpressionInDebugger(string expression)
125+
public string RunExpressionInDebugger(string expression)
126126
{
127-
return dte.Debugger.GetExpression(expression);
127+
var exprResult = dte.Debugger.GetExpression(expression);
128+
if (exprResult.IsValidValue)
129+
{
130+
return exprResult.Value;
131+
}
132+
return string.Empty;
128133
}
129134

130135
Talkpoint MatchTalkPoint(Breakpoint breakpoint)

0 commit comments

Comments
 (0)