Table of contents
TOC
折叠目录
展开目录

停止代码执行Stop Code Execution

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

当您运行您的代码时,它可能会停止执行,原因如下:As you run your code, it may stop executing for one of the following reasons:

  • 发生未捕获的运行时错误An untrapped run-time error occurs.

  • 安装的运行时错误发生,并发生错误时中断选项对话框中常规选项卡上所选。A trapped run-time error occurs, and Break on All Errors is selected on the General tab in the Options dialog box.

  • 遇到断点为止。A breakpoint is encountered.

  • 在代码中,模式切换到中断模式中遇到Stop语句。A Stop statement is encountered in your code, switching the mode tobreak mode.

  • 在代码中,模式切换到设计时遇到End语句。An End statement is encountered in your code, switching the mode todesign time.

  • 您在某个给定点手动终止执行。You halt execution manually at a given point.

  • 监视表达式设置中断如果它的值发生更改或变为真,则会遇到。A watch expression that you set to break if its value changes or becomes true is encountered.

若要手动暂停执行To halt execution manually

  • 若要切换到中断模式,从运行菜单中,选择(CTRL + BREAK),或使用工具栏快捷方式:工具栏按钮To switch to break mode, from the Run menu, choose Break (CTRL+BREAK), or use the toolbar shortcut: Toolbar button.

  • 若要切换到设计时,从运行菜单中,选择重置 < 项目名称>,或使用工具栏快捷方式:工具栏按钮To switch to design time, from the Run menu, choose Reset <projectname>, or use the toolbar shortcut: Toolbar button.

要继续执行,当您的应用程序已停止To continue execution when your application has halted

  • 选择从调试菜单单步执行(F8)、(按 SHIFT + F8)、跳出(CTRL + SHIFT + F8),或者运行到光标处(CTRL + F8。From the Debug menu, choose Step Into (F8), Step Over (SHIFT+F8), Step Out (CTRL+SHIFT+F8), or Run To Cursor (CTRL+F8.
© 2018 Microsoft