- Dart:Scalable Application Development
- Davy Mitchell Sergey Akopkokhyants Ivo Balbaert
- 225字
- 2021-07-09 18:56:27
Observing the Dart VM internals
If you have been watching the output window keenly as you have launched Dart projects, you will have noticed references to the Observatory. This tool (which is part of the Dart SDK) allows developers to look inside a running Dart virtual machine, and profile the ongoing activities. This is useful to find out exactly what an application is doing and where bottlenecks exist.

The Observatory supports command line applications and web applications (Dart versions and not the compiled to JavaScript output) running in Dartium. To enable it, simply pass one of the many Observatory command line parameters—see the SDK documents (https://www.dartlang.org/tools/dart-vm/) for a full listing:
dart --enable-vm-service bin/main.dart
Launch the main.dart
program with the Observatory attached, and browse to the address localhost:8181
(note that this port number can change though it can be specified in the launch command parameter --enable-vm-service=<port>/<IP address>
):
chromium.exe index.html
Launch index.html
with the Observatory attached. The address to put into the web browser will be shown:
Observatory listening on http://127.0.0.1:34935
The URLs can be opened in any web browser, the most important feature is the Refresh button, that appears and re-samples the data that is being displayed.
While you are waiting for the data monitor to collect data, take some time to explore the inner workings of the Dart VM as it runs the code.
- Java范例大全
- 構建移動網站與APP:HTML 5移動開發入門與實戰(跨平臺移動開發叢書)
- Java Web程序設計任務教程
- 程序設計基礎教程:C語言
- 用案例學Java Web整合開發
- Visual Basic 6.0程序設計實驗教程
- 移動增值應用開發技術導論
- Java Web從入門到精通(第2版)
- Maven for Eclipse
- Neo4j 3.x入門經典
- 前端架構設計
- Expert Cube Development with SSAS Multidimensional Models
- C/C++語言程序開發參考手冊
- Mastering MeteorJS Application Development
- Android Application Programming with OpenCV 3