static DnDebugger CreateDnDebuggerDesktop(DebugProcessOptions options) { var clrType = (DesktopCLRTypeDebugInfo)options.CLRTypeDebugInfo; var debuggeeVersion = clrType.DebuggeeVersion ?? DebuggeeVersionDetector.GetVersion(options.Filename); var corDebug = CreateCorDebug(debuggeeVersion); if (corDebug == null) throw new Exception("Could not create an ICorDebug instance"); var dbg = new DnDebugger(corDebug, options.DebugOptions, options.DebugMessageDispatcher, debuggeeVersion); if (options.BreakProcessType != BreakProcessType.None) new BreakProcessHelper(dbg, options.BreakProcessType, options.Filename); dbg.CreateProcess(options); return dbg; }
public static DnDebugger DebugProcess(DebugProcessOptions options) { if (options.DebugMessageDispatcher == null) throw new ArgumentException("DebugMessageDispatcher is null"); var debuggeeVersion = options.DebuggeeVersion ?? DebuggeeVersionDetector.GetVersion(options.Filename); var dbg = new DnDebugger(CreateCorDebug(debuggeeVersion), options.DebugOptions, options.DebugMessageDispatcher, debuggeeVersion); if (options.BreakProcessType != BreakProcessType.None) new BreakProcessHelper(dbg, options.BreakProcessType, options.Filename); dbg.CreateProcess(options); return dbg; }