Browse Source

add Continue button to DebuggeeExceptionForm

pull/18/head
Siegfried Pammer 14 years ago
parent
commit
b4e1e34202
  1. 20
      src/AddIns/Debugger/Debugger.AddIn/Service/DebuggeeExceptionForm.Designer.cs
  2. 11
      src/AddIns/Debugger/Debugger.AddIn/Service/DebuggeeExceptionForm.cs
  3. 4
      src/AddIns/Debugger/Debugger.AddIn/Service/DebuggeeExceptionForm.resx
  4. 2
      src/AddIns/Debugger/Debugger.AddIn/Service/WindowsDebugger.cs

20
src/AddIns/Debugger/Debugger.AddIn/Service/DebuggeeExceptionForm.Designer.cs generated

@ -21,6 +21,7 @@ namespace ICSharpCode.SharpDevelop.Services
this.exceptionView = new System.Windows.Forms.RichTextBox(); this.exceptionView = new System.Windows.Forms.RichTextBox();
this.btnStop = new System.Windows.Forms.Button(); this.btnStop = new System.Windows.Forms.Button();
this.btnBreak = new System.Windows.Forms.Button(); this.btnBreak = new System.Windows.Forms.Button();
this.btnContinue = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
@ -60,7 +61,7 @@ namespace ICSharpCode.SharpDevelop.Services
// //
this.btnStop.Anchor = System.Windows.Forms.AnchorStyles.Bottom; this.btnStop.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.btnStop.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnStop.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnStop.Location = new System.Drawing.Point(340, 366); this.btnStop.Location = new System.Drawing.Point(385, 366);
this.btnStop.Name = "btnStop"; this.btnStop.Name = "btnStop";
this.btnStop.Size = new System.Drawing.Size(115, 30); this.btnStop.Size = new System.Drawing.Size(115, 30);
this.btnStop.TabIndex = 3; this.btnStop.TabIndex = 3;
@ -73,7 +74,7 @@ namespace ICSharpCode.SharpDevelop.Services
// //
this.btnBreak.Anchor = System.Windows.Forms.AnchorStyles.Bottom; this.btnBreak.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.btnBreak.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnBreak.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnBreak.Location = new System.Drawing.Point(219, 366); this.btnBreak.Location = new System.Drawing.Point(143, 366);
this.btnBreak.Name = "btnBreak"; this.btnBreak.Name = "btnBreak";
this.btnBreak.Size = new System.Drawing.Size(115, 30); this.btnBreak.Size = new System.Drawing.Size(115, 30);
this.btnBreak.TabIndex = 4; this.btnBreak.TabIndex = 4;
@ -82,9 +83,23 @@ namespace ICSharpCode.SharpDevelop.Services
this.btnBreak.UseVisualStyleBackColor = true; this.btnBreak.UseVisualStyleBackColor = true;
this.btnBreak.Click += new System.EventHandler(this.BtnBreakClick); this.btnBreak.Click += new System.EventHandler(this.BtnBreakClick);
// //
// btnContinue
//
this.btnContinue.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.btnContinue.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnContinue.Location = new System.Drawing.Point(264, 366);
this.btnContinue.Name = "btnContinue";
this.btnContinue.Size = new System.Drawing.Size(115, 30);
this.btnContinue.TabIndex = 5;
this.btnContinue.Text = "Continue";
this.btnContinue.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.btnContinue.UseVisualStyleBackColor = true;
this.btnContinue.Click += new System.EventHandler(this.BtnContinueClick);
//
// DebuggeeExceptionForm // DebuggeeExceptionForm
// //
this.ClientSize = new System.Drawing.Size(642, 399); this.ClientSize = new System.Drawing.Size(642, 399);
this.Controls.Add(this.btnContinue);
this.Controls.Add(this.btnBreak); this.Controls.Add(this.btnBreak);
this.Controls.Add(this.btnStop); this.Controls.Add(this.btnStop);
this.Controls.Add(this.exceptionView); this.Controls.Add(this.exceptionView);
@ -96,6 +111,7 @@ namespace ICSharpCode.SharpDevelop.Services
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
} }
private System.Windows.Forms.Button btnContinue;
private System.Windows.Forms.Button btnBreak; private System.Windows.Forms.Button btnBreak;
private System.Windows.Forms.Button btnStop; private System.Windows.Forms.Button btnStop;
private System.Windows.Forms.RichTextBox exceptionView; private System.Windows.Forms.RichTextBox exceptionView;

11
src/AddIns/Debugger/Debugger.AddIn/Service/DebuggeeExceptionForm.cs

@ -38,9 +38,11 @@ namespace ICSharpCode.SharpDevelop.Services
this.btnBreak.Text = StringParser.Parse("${res:MainWindow.Windows.Debug.ExceptionForm.Break}"); this.btnBreak.Text = StringParser.Parse("${res:MainWindow.Windows.Debug.ExceptionForm.Break}");
this.btnStop.Text = StringParser.Parse("${res:MainWindow.Windows.Debug.ExceptionForm.Terminate}"); this.btnStop.Text = StringParser.Parse("${res:MainWindow.Windows.Debug.ExceptionForm.Terminate}");
this.btnContinue.Text = StringParser.Parse("${res:MainWindow.Windows.Debug.ExceptionForm.Continue}");
this.btnBreak.Image = WinFormsResourceService.GetBitmap("Icons.16x16.Debug.Break"); this.btnBreak.Image = WinFormsResourceService.GetBitmap("Icons.16x16.Debug.Break");
this.btnStop.Image = WinFormsResourceService.GetBitmap("Icons.16x16.StopProcess"); this.btnStop.Image = WinFormsResourceService.GetBitmap("Icons.16x16.StopProcess");
this.btnContinue.Image = WinFormsResourceService.GetBitmap("Icons.16x16.Debug.Continue");
} }
void ProcessHandler(object sender, EventArgs e) void ProcessHandler(object sender, EventArgs e)
@ -54,13 +56,14 @@ namespace ICSharpCode.SharpDevelop.Services
this.process.Resumed -= ProcessHandler; this.process.Resumed -= ProcessHandler;
} }
public static void Show(Process process, string title, string message, string stacktrace, Bitmap icon) public static void Show(Process process, string title, string message, string stacktrace, Bitmap icon, bool canContinue)
{ {
DebuggeeExceptionForm form = new DebuggeeExceptionForm(process); DebuggeeExceptionForm form = new DebuggeeExceptionForm(process);
form.Text = title; form.Text = title;
form.pictureBox.Image = icon; form.pictureBox.Image = icon;
form.lblExceptionText.Text = message; form.lblExceptionText.Text = message;
form.exceptionView.Text = stacktrace; form.exceptionView.Text = stacktrace;
form.btnContinue.Enabled = canContinue;
form.Show(WorkbenchSingleton.MainWin32Window); form.Show(WorkbenchSingleton.MainWin32Window);
} }
@ -105,5 +108,11 @@ namespace ICSharpCode.SharpDevelop.Services
this.process.Terminate(); this.process.Terminate();
Close(); Close();
} }
void BtnContinueClick(object sender, EventArgs e)
{
this.process.Continue();
Close();
}
} }
} }

4
src/AddIns/Debugger/Debugger.AddIn/Service/DebuggeeExceptionForm.resx

@ -112,9 +112,9 @@
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
</root> </root>

2
src/AddIns/Debugger/Debugger.AddIn/Service/WindowsDebugger.cs

@ -878,7 +878,7 @@ namespace ICSharpCode.SharpDevelop.Services
string message = string.Format(StringParser.Parse("${res:MainWindow.Windows.Debug.ExceptionForm.Message}"), e.Exception.Type); string message = string.Format(StringParser.Parse("${res:MainWindow.Windows.Debug.ExceptionForm.Message}"), e.Exception.Type);
Bitmap icon = WinFormsResourceService.GetBitmap(e.IsUnhandled ? "Icons.32x32.Error" : "Icons.32x32.Warning"); Bitmap icon = WinFormsResourceService.GetBitmap(e.IsUnhandled ? "Icons.32x32.Error" : "Icons.32x32.Warning");
DebuggeeExceptionForm.Show(debuggedProcess, title, message, stacktraceBuilder.ToString(), icon); DebuggeeExceptionForm.Show(debuggedProcess, title, message, stacktraceBuilder.ToString(), icon, !e.IsUnhandled);
} }
public void JumpToCurrentLine() public void JumpToCurrentLine()

Loading…
Cancel
Save