Skip to content

Commit

Permalink
watch window enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
JaneySprings committed May 30, 2024
1 parent 1108bc9 commit d70f562
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/DotNet.Meteor.Debug/DebugSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ public class DebugSession : Session {
throw new ProtocolException($"command handled by {launchAgent}");
}
var expression = arguments.Expression.TrimEnd(';');
var expression = arguments.TrimExpression();
var frame = frameHandles.Get(arguments.FrameId ?? 0, null);
if (frame == null)
throw new ProtocolException("no active stackframe");
Expand Down
3 changes: 3 additions & 0 deletions src/DotNet.Meteor.Debug/Extensions/ServerExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ public static class ServerExtensions {
return targetDirectory;
}
}
public static string TrimExpression(this DebugProtocol.EvaluateArguments args) {
return args.Expression?.TrimEnd(';')?.Replace("?.", ".");
}

public static T DoSafe<T>(Func<T> handler, Action finalizer = null) {
try {
Expand Down

0 comments on commit d70f562

Please sign in to comment.