vscode-csharp icon indicating copy to clipboard operation
vscode-csharp copied to clipboard

Debugger should have a UI gesture to evaluate properties that require all threads

Open gregg-miskelly opened this issue 11 months ago • 1 comments

Steps to reproduce

  1. Debug the following program
  2. Evaluate Program.Test in the watch window

Expected behavior

There should be a UI gesture to evaluate the expression

Actual behavior

The only way to evaluate Program.Test is to evaluate Program.Test, run-all-threads from the Debug Console (NOTE: This requires a not-yet-released version of the C# extension).

Program content

using System;

namespace clinew
{
    class Program
    {
        static string Test
        {
            get
            {
                System.Diagnostics.Debugger.NotifyOfCrossThreadDependency();
                return "Test";
            }
        }

        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
        }
    }
}

gregg-miskelly avatar Mar 09 '24 00:03 gregg-miskelly

Resolving this issue would require working with VS Code to either enhance the watch window context menu extensibility or to support the notion of evaluation results that indicate they must be manually refreshed by clicking a button.

gregg-miskelly avatar Mar 09 '24 00:03 gregg-miskelly