本文整理匯總了C#中Mono.Debugging.Client.DebuggerSession.Initialize方法的典型用法代碼示例。如果您正苦於以下問題:C# DebuggerSession.Initialize方法的具體用法?C# DebuggerSession.Initialize怎麽用?C# DebuggerSession.Initialize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Mono.Debugging.Client.DebuggerSession
的用法示例。
在下文中一共展示了DebuggerSession.Initialize方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: InternalRun
internal static void InternalRun (ExecutionCommand cmd, DebuggerEngine factory, IConsole c)
{
if (factory == null) {
factory = GetFactoryForCommand (cmd);
if (factory == null)
throw new InvalidOperationException ("Unsupported command: " + cmd);
}
DebuggerStartInfo startInfo = factory.CreateDebuggerStartInfo (cmd);
startInfo.UseExternalConsole = c is ExternalConsole;
startInfo.CloseExternalConsoleOnExit = c.CloseOnDispose;
currentEngine = factory;
session = factory.CreateSession ();
session.Initialize ();
console = c;
SetupSession ();
try {
session.Run (startInfo, GetUserOptions ());
} catch {
Cleanup ();
throw;
}
}
示例2: InternalRun
internal static void InternalRun (ExecutionCommand cmd, DebuggerEngine factory, IConsole c)
{
if (factory == null) {
factory = GetFactoryForCommand (cmd);
if (factory == null)
throw new InvalidOperationException ("Unsupported command: " + cmd);
}
DebuggerStartInfo startInfo = factory.CreateDebuggerStartInfo (cmd);
startInfo.UseExternalConsole = c is ExternalConsole;
startInfo.CloseExternalConsoleOnExit = c.CloseOnDispose;
currentEngine = factory;
session = factory.CreateSession ();
session.ExceptionHandler = ExceptionHandler;
session.Initialize ();
// When using an external console, create a new internal console which will be used
// to show the debugger log
if (startInfo.UseExternalConsole)
console = (IConsole) IdeApp.Workbench.ProgressMonitors.GetOutputProgressMonitor (GettextCatalog.GetString ("Application Output"), Stock.RunProgramIcon, true, true);
else
console = c;
SetupSession ();
try {
session.Run (startInfo, GetUserOptions ());
} catch {
Cleanup ();
throw;
}
}
示例3: InternalRun
internal static void InternalRun (ExecutionCommand cmd, DebuggerEngine factory, IConsole c)
{
if (factory == null) {
factory = GetFactoryForCommand (cmd);
if (factory == null)
throw new InvalidOperationException ("Unsupported command: " + cmd);
}
if (session != null)
throw new InvalidOperationException ("A debugger session is already started");
DebuggerStartInfo startInfo = factory.CreateDebuggerStartInfo (cmd);
startInfo.UseExternalConsole = c is ExternalConsole;
startInfo.CloseExternalConsoleOnExit = c.CloseOnDispose;
currentEngine = factory;
session = factory.CreateSession ();
session.ExceptionHandler = ExceptionHandler;
session.Initialize ();
// When using an external console, create a new internal console which will be used
// to show the debugger log
if (startInfo.UseExternalConsole)
console = (IConsole) IdeApp.Workbench.ProgressMonitors.GetRunProgressMonitor ();
else
console = c;
SetupSession ();
// Dispatch synchronously to avoid start/stop races
DispatchService.GuiSyncDispatch (delegate {
oldLayout = IdeApp.Workbench.CurrentLayout;
IdeApp.Workbench.CurrentLayout = "Debug";
});
try {
session.Run (startInfo, GetUserOptions ());
} catch {
Cleanup ();
throw;
}
}