string GetDbgShimAndVerify()
        {
            var dbgShimFilename = DotNetHelpers.GetDebugShimFilename(Bitness);

            if (!File.Exists(dbgShimFilename))
            {
                throw new Exception("Couldn't find dbgshim.dll: " + dbgShimFilename);
            }
            return(dbgShimFilename);
        }
        IEnumerable <DotNetAttachProgramOptions> TryGetCoreCLRInfos(Process process)
        {
            // We can only debug processes with the same bitness
            int bitness         = IntPtr.Size * 8;
            var dbgShimFilename = DotNetHelpers.GetDebugShimFilename(bitness);

            foreach (var ccInfo in CoreCLRHelper.GetCoreCLRInfos(process.Id, null, dbgShimFilename))
            {
                yield return(new DotNetAttachProgramOptions(process.Id, ccInfo.CoreCLRTypeInfo.Version, ccInfo.CoreCLRTypeInfo.CoreCLRFilename));
            }
        }