<div>通过代码阅读或者加输出语句查找程序错误;当程序结构越来越复杂时,需要专门的技术来发现和定位错误,就是“程序调试”。</div><div> </div>
<span style="font-size: 30pt; color: black;">如何进行程序调试:</span>
<div style="margin-top: 6pt; margin-bottom: 0pt; margin-left: 0in; text-indent: 0in; direction: ltr; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size:25.0pt"><span style="mso-special-format:bullet;
color:#1F497D;mso-color-index:3;font-family:Wingdings">•</span></span><span style="font-size: 25pt; color: rgb(38, 38, 38);">步骤</span><span style="font-size: 25pt; color: rgb(38, 38, 38);">1</span><span style="font-size: 25pt; color: rgb(38, 38, 38);">:分析错误,设置断点</span></div>
<div style="margin-top: 6pt; margin-bottom: 0pt; margin-left: 0in; text-indent: 0in; direction: ltr; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size:25.0pt"><span style="mso-special-format:bullet;
color:#1F497D;mso-color-index:3;font-family:Wingdings">•</span></span><span style="font-size: 25pt; color: rgb(38, 38, 38);">步骤</span><span style="font-size: 25pt; color: rgb(38, 38, 38);">2</span><span style="font-size: 25pt; color: rgb(38, 38, 38);">:启动调试</span></div>
<div style="margin-top: 6pt; margin-bottom: 0pt; margin-left: 0in; text-indent: 0in; direction: ltr; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size:25.0pt"><span style="mso-special-format:bullet;
color:#1F497D;mso-color-index:3;font-family:Wingdings">•</span></span><span style="font-size: 25pt; color: rgb(38, 38, 38);">步骤</span><span style="font-size: 25pt; color: rgb(38, 38, 38);">3</span><span style="font-size: 25pt; color: rgb(38, 38, 38);">:单步运行</span></div>
<p style="margin-top: 6pt; margin-bottom: 0pt; margin-left: 0.5in; text-indent: 0in; direction: ltr; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: 25pt; color: rgb(38, 38, 38);">调试启动后,运行到设置断点的代码行将停住</span></p>
<p style="margin-top: 6pt; margin-bottom: 0pt; margin-left: 0.5in; text-indent: 0in; direction: ltr; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: 25pt; color: rgb(38, 38, 38);">点击</span><span style="font-size: 25pt; color: rgb(38, 38, 38);">F6</span><span style="font-size: 25pt; color: rgb(38, 38, 38);">键可以单步运行程序,观察程序运行过程</span></p>
<div style="margin-top: 6pt; margin-bottom: 0pt; margin-left: 0in; text-indent: 0in; direction: ltr; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size:25.0pt"><span style="mso-special-format:bullet;
color:#1F497D;mso-color-index:3;font-family:Wingdings">•</span></span><span style="font-size: 25pt; color: rgb(38, 38, 38);">步骤</span><span style="font-size: 25pt; color: rgb(38, 38, 38);">4</span><span style="font-size: 25pt; color: rgb(38, 38, 38);">:观察变量</span></div>
<p style="margin-top: 6pt; margin-bottom: 0pt; margin-left: 0.5in; text-indent: 0in; direction: ltr; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: 25pt; color: rgb(38, 38, 38);">单步运行时可以在“变量”视图中看到变量当前的值</span></p>
<div style="margin-top: 6pt; margin-bottom: 0pt; margin-left: 0in; text-indent: 0in; direction: ltr; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size:25.0pt"><span style="mso-special-format:bullet;
color:#1F497D;mso-color-index:3;font-family:Wingdings">•</span></span><span style="font-size: 25pt; color: rgb(38, 38, 38);">步骤</span><span style="font-size: 25pt; color: rgb(38, 38, 38);">5</span><span style="font-size: 25pt; color: rgb(38, 38, 38);">:发现问题</span></div>
<span style="font-size: 25pt; color: rgb(38, 38, 38);">步骤</span><span style="font-size: 25pt; color: rgb(38, 38, 38);">6</span><span style="font-size: 25pt; color: rgb(38, 38, 38);">:修正代码,重新运行</span>
<p style="margin-top: 6pt; margin-bottom: 0pt; margin-left: 0in; text-indent: 0in; direction: ltr; unicode-bidi: embed; vertical-align: baseline;"><span style="font-size: 25pt; color: rgb(38, 38, 38);">步骤</span><span style="font-size: 25pt; color: rgb(38, 38, 38);">7</span><span style="font-size: 25pt; color: rgb(38, 38, 38);">:解决问题</span></p>
<p style="margin-top: 0pt; margin-bottom: 0pt; direction: ltr; unicode-bidi: embed; vertical-align: baseline;"><span style="font-family:Arial;mso-ascii-font-family:Arial;mso-fareast-font-family:
黑体;mso-bidi-font-family:+mn-cs;mso-bidi-theme-font:minor-bidi;color:black;
mso-font-kerning:12.0pt;language:en-US;font-weight:bold;mso-style-textfill-type:
solid;mso-style-textfill-fill-color:black;mso-style-textfill-fill-alpha:100.0%">F5</span><span style="font-family:黑体;mso-ascii-font-family:Arial;mso-fareast-font-family:黑体;
mso-bidi-font-family:+mn-cs;mso-bidi-theme-font:minor-bidi;color:black;
mso-font-kerning:12.0pt;language:zh-CN;font-weight:bold;mso-style-textfill-type:
solid;mso-style-textfill-fill-color:black;mso-style-textfill-fill-alpha:100.0%">:单步跳入</span></p>
<p style="margin-top: 0pt; margin-bottom: 0pt; direction: ltr; unicode-bidi: embed; vertical-align: baseline;"><span style="font-family:Arial;mso-ascii-font-family:Arial;mso-fareast-font-family:
黑体;mso-bidi-font-family:+mn-cs;mso-bidi-theme-font:minor-bidi;color:black;
mso-font-kerning:12.0pt;language:en-US;font-weight:bold;mso-style-textfill-type:
solid;mso-style-textfill-fill-color:black;mso-style-textfill-fill-alpha:100.0%">F6</span><span style="font-family:黑体;mso-ascii-font-family:Arial;mso-fareast-font-family:黑体;
mso-bidi-font-family:+mn-cs;mso-bidi-theme-font:minor-bidi;color:black;
mso-font-kerning:12.0pt;language:zh-CN;font-weight:bold;mso-style-textfill-type:
solid;mso-style-textfill-fill-color:black;mso-style-textfill-fill-alpha:100.0%">:单步跳过</span></p>
<p style="margin-top: 0pt; margin-bottom: 0pt; direction: ltr; unicode-bidi: embed; vertical-align: baseline;"><span style="font-family:黑体;mso-ascii-font-family:Arial;mso-fareast-font-family:黑体;
mso-bidi-font-family:+mn-cs;mso-bidi-theme-font:minor-bidi;color:black;
mso-font-kerning:12.0pt;language:zh-CN;font-weight:bold;mso-style-textfill-type:
solid;mso-style-textfill-fill-color:black;mso-style-textfill-fill-alpha:100.0%">单击“继续”按钮或</span><span style="font-family:Arial;mso-ascii-font-family:Arial;mso-fareast-font-family:
黑体;mso-bidi-font-family:+mn-cs;mso-bidi-theme-font:minor-bidi;color:black;
mso-font-kerning:12.0pt;language:en-US;font-weight:bold;mso-style-textfill-type:
solid;mso-style-textfill-fill-color:black;mso-style-textfill-fill-alpha:100.0%">F8</span><span style="font-family:黑体;mso-ascii-font-family:Arial;mso-fareast-font-family:黑体;
mso-bidi-font-family:+mn-cs;mso-bidi-theme-font:minor-bidi;color:black;
mso-font-kerning:12.0pt;language:zh-CN;font-weight:bold;mso-style-textfill-type:
solid;mso-style-textfill-fill-color:black;mso-style-textfill-fill-alpha:100.0%">,执行时只在断点处停下</span></p>