It is possible to debug Fuchsia binaries using zxdb
. For the sake of this example, we will be using base_unittests
as the test suite we wish to execute:
(From Chromium) Install your package(s) and its symbols onto the device.
$ out/fuchsia/bin/install_base_unittests
(From Fuchsia source tree) Run the debugger.
$ fx debug
[zxdb] attach base_unittests.cmx
[zxdb] break base::GetDefaultJob
$ fx shell run fuchsia-pkg://fuchsia.com/base_unittests#meta/base_unittests.cmx
zxdb
.[zxdb] f ▶ 0 base::GetDefaultJob() • default_job.cc:18 1 base::$anon::LaunchChildTestProcessWithOptions(…) • test_launcher.cc:335 2 base::$anon::DoLaunchChildTestProcess(…) • test_launcher.cc:528 3 base::TestLauncher::LaunchChildGTestProcess(…) • test_launcher.cc:877 ...
help
inside ZXDB to see what debugger commands are available.