---
title: "调试 - 主菜单 - MetaEditor 帮助"
description: "该菜单旨在 调试 MQL4/MQL5 程序。 它包含以下命令： ... - 调试 - 主菜单 - MetaEditor 帮助"
image: "https://www.metatrader5.com/i/logo_metatrader5.png"
url: "https://www.metatrader5.com/zh/metaeditor/help/main_menu/main_menu_debug"
---

[MetaEditor 帮助](https://www.metatrader5.com/zh/metaeditor/help) → [主菜单](https://www.metatrader5.com/zh/metaeditor/help/main_menu) → 调试

# 调试

该菜单旨在 [调试](https://www.metatrader5.com/zh/metaeditor/help/development/debug) MQL4/MQL5 程序。 它包含以下命令：

|  | 命令 | 描述 |
| --- | --- | --- |
| ![启动](https://www.metatrader5.com/i/help/metaeditor/en/start_debug_icon.png) | 依据真实数据开始/恢复调试 | 启动在实时更新图表上 [调试](https://www.metatrader5.com/zh/metaeditor/help/development/debug) 当前代码。 |
| ![依据历史数据开始](https://www.metatrader5.com/i/help/metaeditor/en/debug_history_icon.png) | 依据历史数据开始 | 启动依据历史数据 [调试](https://www.metatrader5.com/zh/metaeditor/help/development/debug#history)。 程序在策略测试器的可视化测试模式下检测运行。 应用程序在测试器中图表上以模拟的逐笔报价序列执行。 |
| ![暂停](https://www.metatrader5.com/i/help/metaeditor/en/break_debug_icon.png) | 暂停 | 暂停程序调试。 若要继续调试，请单击继续。 |
| ![停止](https://www.metatrader5.com/i/help/metaeditor/en/stop_debug_icon.png) | 停止 | 停止调试。 |
| ![步进](https://www.metatrader5.com/i/help/metaeditor/en/step_into_icon.png) | 步进 | 单步执行程序，进入被调用的函数。 |
| ![步跃](https://www.metatrader5.com/i/help/metaeditor/en/step_over_icon.png) | 步跃 | 单步执行程序，不进入被调用的函数。 |
| ![退出](https://www.metatrader5.com/i/help/metaeditor/en/step_out_icon.png) | 退出 | 在高一级上单步执行程序。 |
| ![启用断点](https://www.metatrader5.com/i/help/metaeditor/en/breakpoint_icon.png) | 切换断点 | 取决于当前状态启用/禁用一个当前行上的 [断点](https://www.metatrader5.com/zh/metaeditor/help/development/debug#breakpoint)。 |
| ![清除所有断点](https://www.metatrader5.com/i/help/metaeditor/en/clear_all_breakpoints_icon.png) | 清除所有断点 | 清除当前调试程序的所有断点。 |
| ![开始依据真实数据分析](https://www.metatrader5.com/i/help/metaeditor/en/start_profiling_icon.png) | 开始依据真实数据分析 | 在实时更新的正常图表上启动当前代码 [分析](https://www.metatrader5.com/zh/metaeditor/help/development/profiling)。 |
| ![开始依据历史数据分析](https://www.metatrader5.com/i/help/metaeditor/en/start_profiling_history_icon.png) | 开始依据历史数据分析 | 在策略测试器的可视模式下启动当前代码的 [分析](https://www.metatrader5.com/zh/metaeditor/help/development/profiling)。 |
| ![停止分析](https://www.metatrader5.com/i/help/metaeditor/en/stop_profiling_icon.png) | 停止分析 | 停止分析。 |

## In this section

- [文件](https://www.metatrader5.com/zh/metaeditor/help/main_menu/main_menu_file)
- [编辑](https://www.metatrader5.com/zh/metaeditor/help/main_menu/main_menu_edit)
- [搜索](https://www.metatrader5.com/zh/metaeditor/help/main_menu/main_menu_search)
- [视图](https://www.metatrader5.com/zh/metaeditor/help/main_menu/main_menu_view)
- 调试
- [构建](https://www.metatrader5.com/zh/metaeditor/help/main_menu/main_menu_build)
- [工具](https://www.metatrader5.com/zh/metaeditor/help/main_menu/main_menu_tools)
- [窗口](https://www.metatrader5.com/zh/metaeditor/help/main_menu/main_menu_window)
- [帮助](https://www.metatrader5.com/zh/metaeditor/help/main_menu/main_menu_help)

```json
{"@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [ {"@type": "ListItem", "position": 1, "item": {"@id": "https://www.metatrader5.com/zh/metaeditor/help", "name": "MetaEditor 帮助"}}, {"@type": "ListItem", "position": 2, "item": {"@id": "https://www.metatrader5.com/zh/metaeditor/help/main_menu", "name": "主菜单"}}, {"@type": "ListItem", "position": 3, "item": {"@id": "https://www.metatrader5.com/zh/metaeditor/help/main_menu/main_menu_debug", "name": "调试"}} ]}
{ "@context": "https://schema.org", "@type": "FAQPage", "mainEntity": [{ "@type": "Question", "name": "MetaTrader 5: 调试", "acceptedAnswer": { "@type": "Answer", "text": "该菜单旨在 调试 MQL4/MQL5 程序。 它包含以下命令：  ..." } }] }
```
