Reviewed on: 2019-07-25
Inspect is a library for exposing structured trees of a component's internal state. More can be read about inspect here.
This library can be added to projects by including the
//sdk/dart/fuchsia_inspect GN target and importing the
package:fuchsia_inspect/inspect.dart package. Inspect is also available in the SDK.
Documentation on the Inspect API is available here.
Inspect data may be discovered and retrieved with iquery.
Unit tests for Inspect are available in the
fuchsia_inspect_package_unittests package. This includes tests from the
test/vmo directories. To run these tests, include
--with //sdk/dart:tests in the
fx set invocation and run the following command:
$ fx build && fx run-host-tests fuchsia_inspect_package_unittests
Integration tests are available in the
test/integration directories. The former has more documentation here. The latter may be run with the
fx set invocation described above and the following command:
$ fx run-test dart_inspect_vmo_test
Public members of the library are exposed in
lib/inspect.dart. Private implementations are in
lib/src/*. Unit and integration tests may be found in