0
Under review

Allow blacklisting for property evaluation

ozcode 1 month ago in Feature Requests • updated by Leo Omri Finkelstein (Support Engineer) 1 month ago 1

It would be great if ozcode allowed to blacklist certain properties by name so that opening a class for debugging does not delay/crash the debugger. Here is a simple sample class that stresses the debugger (the real legagy classes are sadly much much worse):


using System;
using System.Diagnostics;
using System.Threading;

namespace ConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            var terribleClass = new TerribleClass();
            terribleClass.DoOperation();
            Debugger.Break();
        }
    }

    class TerribleClass
    {
        private object _o = new object();
        private ManualResetEvent _event = new ManualResetEvent(false);

        public bool TakeLock => Monitor.TryEnter(_o, TimeSpan.FromMinutes(1));

        public void DoOperation()
        {
            Console.WriteLine("Working");
            var thread = new Thread(Start);
            thread.Start();
            _event.WaitOne();
        }

        private void Start(object obj)
        {
            Monitor.Enter(_o);
            _event.Set();
        }
    }
}






Under review

We are definitely adding such a feature. In fact, in OzCode V3.5 we added a feature into Search which allows you to completely ignore regular properties and only search fields and autoproperties and thus eliminating the risk of timeouts during the search.

In the meantime, we recommend using System.Diagnostics.Debugger.NotifyOfCrossThreadDependency() in code samples like the one you've mentioned above.