Index: mojo/devtools/common/docs/mojo_debug.md |
diff --git a/mojo/devtools/common/README.md b/mojo/devtools/common/docs/mojo_debug.md |
similarity index 55% |
copy from mojo/devtools/common/README.md |
copy to mojo/devtools/common/docs/mojo_debug.md |
index 98cfaa47829b2337233d4cf6f6b831b68168810d..27c8c442fe5cd53abcadd74f180f0e963130c0e6 100644 |
--- a/mojo/devtools/common/README.md |
+++ b/mojo/devtools/common/docs/mojo_debug.md |
@@ -1,62 +1,9 @@ |
-# Devtools |
- |
-Unopinionated tools for **running**, **debugging** and **testing** Mojo apps. |
- |
-## Install |
- |
-``` |
-git clone https://github.com/domokit/devtools.git |
-``` |
- |
-## Contents |
- |
-Devtools offers the following tools: |
- |
- - `mojo_run` - shell runner |
- - `mojo_test` - apptest runner |
- - `mojo_debug` - debugger supporting interactive tracing and debugging of a |
- running mojo shell |
- |
-Additionally, `remote_adb_setup` script helps to configure adb on a remote |
-machine to communicate with a device attached to a local machine, forwarding the |
-ports used by `mojo_run`. |
- |
-### Runner |
- |
-`mojo_run` allows you to run a Mojo shell either on the host, or on an attached |
-Android device. |
- |
-```sh |
-mojo_run APP_URL # Run on the host. |
-mojo_run APP_URL --android # Run on Android device. |
-mojo_run "APP_URL APP_ARGUMENTS" # Run an app with startup arguments |
-``` |
- |
-Unless running within a Mojo checkout, we need to indicate the path to the shell |
-binary: |
- |
-```sh |
-mojo_run --shell-path path/to/shell/binary APP_URL |
-``` |
- |
-Some applications are meant to be run embedded in a **window manager**. To run |
-these, you can pass the app url using the `--embed` flag. This will run the |
-window manager and pass the given url to it: |
- |
-```sh |
-mojo_run --embed APP_URL [--android] |
-``` |
- |
-By default, `mojo_run` uses https://core.mojoapps.io/kiosk_wm.mojo as the window |
-manager. You can pass a different window manager url using the |
-`--window-manager` flag to override this. |
- |
-### Debugger |
+# mojo_debug |
`mojo_debug` allows you to interactively inspect a running shell, collect |
performance traces and attach a gdb debugger. |
-#### Tracing |
+## Tracing |
[Performance |
traces](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) |
can either be collected by Mojo Shell during its startup, or collected |
@@ -86,7 +33,7 @@ mojo_debug tracing stop [result.json] |
Trace files can be then loaded using the trace viewer in Chrome available at |
`about://tracing`. |
-#### GDB |
+## GDB |
It is possible to inspect a Mojo Shell process using GDB. The `mojo_debug` |
script can be used to launch GDB and attach it to a running shell process |
(android only): |
@@ -116,7 +63,7 @@ If you want to debug the startup of your application, you can pass |
`--wait-for-debugger` to `mojo_run` to have the Mojo Shell stop and wait to be |
attached by `gdb` before continuing. |
-#### Android crash stacks |
+## Android crash stacks |
When Mojo shell crashes on Android ("Unfortunately, Mojo shell has stopped.") |
due to a crash in native code, `mojo_debug` can be used to find and symbolize |
the stack trace present in the device log: |
@@ -124,10 +71,3 @@ the stack trace present in the device log: |
```sh |
mojo_debug device stack |
``` |
- |
-## Development |
- |
-The library is canonically developed [in the mojo |
-repository](https://github.com/domokit/mojo/tree/master/mojo/devtools/common), |
-https://github.com/domokit/devtools is a mirror allowing to consume it |
-separately. |