public static void VscxOnRuntimeInstanceLoad(this DkmRuntimeInstance runtime) {
      if (runtime.TagValue != DkmRuntimeInstance.Tag.NativeRuntimeInstance)
        return;

      DkmNativeRuntimeInstance nativeRuntime = (DkmNativeRuntimeInstance)runtime;
      bool isChrome = false;
      bool isTestProcess = false;

      // Check if the process is a chrome executable, and if so, attach a CallstackFilter to the DkmProcess.
      if (ChromeUtility.IsChromeProcess(nativeRuntime.Process.Path))
        isChrome = true;
#if DEBUG
      string fileName = Path.GetFileName(nativeRuntime.Process.Path);
      if (fileName.Equals("vistest.exe", StringComparison.CurrentCultureIgnoreCase))
        isTestProcess = true;
#endif

      if (isTestProcess || isChrome) {
        DkmProcess process = nativeRuntime.Process;

        DebugProcessOptions options = DebugProcessOptions.Create(process.DebugLaunchSettings.OptionsString);
        ProcessDebugOptionsDataItem optionsDataItem = new ProcessDebugOptionsDataItem(options);
        process.SetDataItem(DkmDataCreationDisposition.CreateAlways, optionsDataItem);

        if (isTestProcess || ShouldEnableChildDebugging(nativeRuntime.Process, options)) {
          process.SetDataItem(DkmDataCreationDisposition.CreateAlways, new RuntimeBreakpointHandler());
          process.SetDataItem(DkmDataCreationDisposition.CreateAlways, new AutoAttachToChildHandler());
        }
      }
    }
        public static void VscxOnRuntimeInstanceLoad(this DkmRuntimeInstance runtime)
        {
            if (runtime.TagValue != DkmRuntimeInstance.Tag.NativeRuntimeInstance)
            {
                return;
            }

            DkmNativeRuntimeInstance nativeRuntime = (DkmNativeRuntimeInstance)runtime;
            bool isChrome      = false;
            bool isTestProcess = false;

            // Check if the process is a chrome executable, and if so, attach a CallstackFilter to the DkmProcess.
            if (ChromeUtility.IsChromeProcess(nativeRuntime.Process.Path))
            {
                isChrome = true;
            }
#if DEBUG
            string fileName = Path.GetFileName(nativeRuntime.Process.Path);
            if (fileName.Equals("vistest.exe", StringComparison.CurrentCultureIgnoreCase))
            {
                isTestProcess = true;
            }
#endif

            if (isTestProcess || isChrome)
            {
                DkmProcess process = nativeRuntime.Process;

                DebugProcessOptions         options         = DebugProcessOptions.Create(process.DebugLaunchSettings.OptionsString);
                ProcessDebugOptionsDataItem optionsDataItem = new ProcessDebugOptionsDataItem(options);
                process.SetDataItem(DkmDataCreationDisposition.CreateAlways, optionsDataItem);

                if (isTestProcess || ShouldEnableChildDebugging(nativeRuntime.Process, options))
                {
                    process.SetDataItem(DkmDataCreationDisposition.CreateAlways, new RuntimeBreakpointHandler());
                    process.SetDataItem(DkmDataCreationDisposition.CreateAlways, new AutoAttachToChildHandler());
                }
            }
        }