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.6.0。頁面最後更新於 2024-05-06。 檢視原始碼 或 回報問題。