Documentation

View Diagnostics

You can view and diagnose errors and warnings generated by your model using theDiagnostic Viewer。这Diagnostic Viewer显示三种类型的诊断消息:错误,警告和信息。模型在运行时操作期间生成这些消息,例如模型负载,仿真或更新图。

诊断查看器窗口分为:

  • Toolbar menu: Displays various commands to help you manage the diagnostic messages. For more information, seeToolbar

  • Diagnostic Message pane: Displays the error, warning, and information messages. For more information, see诊断消息窗格

  • Suggested Actions: Displays suggestions and fixes to correct the diagnostic errors and warnings. For more information, see.Suggested Actions

Toolbar

To manage the diagnostic messages, use theDiagnostic Viewer工具栏。

Button Action

扩展或崩溃消息

将所有或最新消息保存在日志文件中

复制所有或最新消息

清除除最新消息以外的全部或全部

滤除错误,警告和信息消息

Group similar type of messages

搜索消息以获取特定关键字并在消息之间导航

Set maximum number of models to display in tabbed panes and the maximum number of events to display per model

诊断消息窗格

诊断信息窗格显示错误,佤邦rning, and information messages in a tabbed format. These messages are color-coded for distinction and are hierarchical.

A new stage is generated for each successive event, you can save or clear stage. Each stage represents a single event such as model load, update diagram, or simulation.

Different types of diagnostic messages are:

  • Information message: Displays the information related to a model load. Information messages are marked as

  • 高优先级警告:显示模型负载期间遇到的错误,作为高优先级警告。任何后续操作,例如在模型上进行更新而不纠正高优先级警告消息,都标记为错误。高优先警告被标记为

  • Warning: Displays the warnings associated during an operation on a model. Warnings are marked as

  • Error: Displays the errors associated during an operation on a model. Errors are marked as

    Tip

    To locate the source of error, click the hyperlink in the message. The source of error in the model is highlighted.

Suppress Diagnostics

诊断查看器提供了Suppressbutton for certain diagnostics. This button allows you to suppress certain numerical diagnostics (for example, overflow, saturation, precision loss) for specific objects in your model. You can also suppress certain errors that have diagnostic level set to错误在里面Diagnosticssection of Model Configuration Parameters. You can add a comment for the suppressed diagnostics.

要抑制指定来源的诊断,请单击Suppressbutton next to the diagnostic in the Diagnostic Viewer. You can restore the diagnostic from the source by clickingRestore。Diagnostic suppressions are saved with the model and persist across sessions.

这suppressed diagnostics are displayed in theSuppressions标签。您可以通过使用该诊断来恢复被抑制的诊断,将注释添加或编辑注释通过使用RestoreAdd Commentbuttons respectively. Alternatively, you can perform these actions on the suppressed diagnostic by selecting one of the options from theActionsmenu.

Suppressiontab of the Diagnostic Viewer displays the model name in the left pane of the suppressed diagnostics in the right pane in a tabular format. You can use the filter options available in theDiagnostic,Suppression Location, and the评论列以过滤诊断。

You can also control the suppression of diagnostics from the command line. For more information, seeSuppress Diagnostic Messages Programmatically

Suggested Actions

Diagnostic viewer provides suggestions and fixes for diagnostic error and warning messages. These suggestions and fixes are provided in theSuggested Actionssection of diagnostic message pane.

诊断错误或警告可以具有多个修复和建议。每个修复都与使固定button.

You can click the使固定button for the most suitable fix to rectify the error automatically. In some cases, you can provide the fix by one of these ways:

  • Enter the values in the available edit boxes.

  • Select a value from one of the listed values from a combo box.

使固定成功应用修复程序后,不再有诊断错误或警告的按钮。如果修复程序不成功,则显示故障消息Suggested Actionssection.

Suggestions are provided for errors and warnings that cannot be fixed automatically.

不te

Suggested Actions部分仅适用于具有预定义修复的诊断错误或警告。

相关话题

这个话题有帮助吗?