Browse Source

Add debug-mode keyboard shortcut: Ctrl+Alt+Shift+G = trigger GC and display heap memory in status bar.

pull/18/head
Daniel Grunwald 14 years ago
parent
commit
bd5105137d
  1. 4
      src/Main/Base/Project/Src/Gui/Workbench/WpfWorkbench.cs

4
src/Main/Base/Project/Src/Gui/Workbench/WpfWorkbench.cs

@ -748,6 +748,10 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -748,6 +748,10 @@ namespace ICSharpCode.SharpDevelop.Gui
}
this.StatusBar.SetMessage("TextRenderingMode=" + TextOptions.GetTextRenderingMode(this));
}
if (!e.Handled && e.Key == Key.G && e.KeyboardDevice.Modifiers == (ModifierKeys.Control | ModifierKeys.Shift | ModifierKeys.Alt)) {
GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced);
this.StatusBar.SetMessage("Total memory = " + (GC.GetTotalMemory(true) / 1024 / 1024f).ToString("f1") + " MB");
}
}
#endif

Loading…
Cancel
Save