dart info
dart info
命令會輸出關於已安裝的 dart
工具、正在執行的 Dart 程序,以及專案資訊(如果在包含 pubspec.yaml
檔案的目錄中)的診斷資訊。輸出的資訊可用於除錯工具問題或回報錯誤。
若要輸出與您的系統和 Dart 安裝相關的一般資訊,包括正在執行的 Dart 程序,請從任何目錄執行 dart info
$ dart info
例如,在 macOS 上,輸出結果會類似於以下內容
markdown
#### General info
- Dart 2.19.2 (stable) (Tue Feb 7 18:37:17 2023 +0000) on "macos_arm64"
- on macos / Version 13.1 (Build 22C65)
- locale is en-US
#### Process info
| Memory | CPU | Elapsed time | Command line |
| -----: | ----: | -----------: | ----------------------------------|
| 253 MB | 49.7% | 00:00 | analysis_server.dart.snapshot ... |
| 69 MB | 18.7% | 00:00 | dart analyze |
若要在輸出中包含專案資訊,請在包含 pubspec.yaml
檔案的目錄中執行 dart info
。產生的輸出會包含額外的專案資訊區段
#### Project info
- sdk constraint: '>=2.19.2 <3.0.0'
- dependencies: path
- dev_dependencies: lints, test
若要在顯示的專案和程序資訊中包含檔案路徑和路徑相依性,請新增 --no-remove-file-paths
選項
$ dart info --no-remove-file-paths
除非另有說明,否則本網站上的文件反映的是 Dart 3.7.1 版本。頁面最後更新於 2024-05-06。 檢視原始碼 或 回報問題。