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