在Delphi中,每当我的程序变得无法响应以查看主线程正在做什么时,我习惯按F12,主要用于堆栈跟踪,但有时也用于本地变量。
现在我正在玩SharpDevelop并且看不到任何类似的东西。它有可能吗?
答案 0 :(得分:0)
SharpDevelop中没有用于调试中断的预定义键盘快捷键。通过选择Debug-Break从Debug菜单中可以看到它。您也可以按主工具栏中的暂停按钮。
如果您需要键盘快捷键,则需要编辑ICSharpCode.SharpDevelop.addin文件并在Break菜单中添加快捷方式。下面显示了Break菜单项,没有键盘快捷键,以及Continue菜单项,其中F5为快捷键。
<Condition name="DebuggerSupports" debuggersupports = "ExecutionControl">
<MenuItem id = "ExecutionControlSeparator" type = "Separator" />
<Condition name="IsProcessRunning" isprocessrunning = "True" isdebugging = "True" action = "Disable">
<MenuItem id = "Break"
label = "${res:XML.MainMenu.DebugMenu.Break}"
icon = "Icons.16x16.Debug.Break"
class = "ICSharpCode.SharpDevelop.Project.Commands.BreakDebuggingCommand"/>
</Condition>
<Condition name="IsProcessRunning" isprocessrunning = "False" isdebugging = "True" action = "Disable">
<MenuItem id = "Continue"
label = "${res:XML.MainMenu.DebugMenu.Continue}"
icon = "Icons.16x16.Debug.Continue"
shortcut = "F5"
class = "ICSharpCode.SharpDevelop.Project.Commands.ContinueDebuggingCommand"/>
</Condition>
</Condition>
因此,如果您想通过编辑ICSharpCode.SharpDevelop.addin文件,可以为Break菜单项添加新的快捷方式属性。