OLD | NEW |
1 # Devtools | 1 # Devtools |
2 | 2 |
3 Unopinionated tools for **running**, **debugging** and **testing** Mojo apps. | 3 Unopinionated tools for **running**, **debugging** and **testing** Mojo apps. |
4 | 4 |
5 ## Install | 5 ## Install |
6 | 6 |
7 ``` | 7 ``` |
8 git clone https://github.com/domokit/devtools.git | 8 git clone https://github.com/domokit/devtools.git |
9 ``` | 9 ``` |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 app, you have to first start the window manager app, then have it embed the app | 43 app, you have to first start the window manager app, then have it embed the app |
44 you are interested in. It is done as follows using the default window manager: | 44 you are interested in. It is done as follows using the default window manager: |
45 | 45 |
46 ```sh | 46 ```sh |
47 mojo_run "mojo:window_manager APP_URL" | 47 mojo_run "mojo:window_manager APP_URL" |
48 ``` | 48 ``` |
49 | 49 |
50 By default, `mojo_run` uses `mojo:kiosk_wm` as the default window manager. It | 50 By default, `mojo_run` uses `mojo:kiosk_wm` as the default window manager. It |
51 can be changed using the `--window-manager` flag. | 51 can be changed using the `--window-manager` flag. |
52 | 52 |
53 #### Sky apps | |
54 | |
55 To run a [Sky](https://github.com/domokit/sky_engine) app, you need to build | |
56 `sky_viewer.mojo` in a Sky checkout, and indicate the path to the binary using | |
57 the `--map-url` parameter: | |
58 | |
59 ```sh | |
60 mojo_run --map-url mojo:sky_viewer=/path/to/sky/viewer "mojo:window_manager APP_
URL" | |
61 ``` | |
62 | |
63 If the app does not declare a shebang indicating that it needs to be run in | |
64 `sky_viewer`, pass `--sky` to map `sky_viewer` as a default content handler for | |
65 dart apps: | |
66 | |
67 ```sh | |
68 mojo_run --map-url mojo:sky_viewer=/path/to/sky/viewer "mojo:window_manager APP_
URL" --sky | |
69 ``` | |
70 | |
71 Note that Sky apps will need the --use-osmesa flag to run | |
72 over [chromoting](https://support.google.com/chrome/answer/1649523?hl=en): | |
73 | |
74 ### Debugger | 53 ### Debugger |
75 | 54 |
76 `mojo_debug` allows you to interactively inspect a running shell, collect | 55 `mojo_debug` allows you to interactively inspect a running shell, collect |
77 performance traces and attach a gdb debugger. | 56 performance traces and attach a gdb debugger. |
78 | 57 |
79 #### Tracing | 58 #### Tracing |
80 To collect [performance | 59 To collect [performance |
81 traces](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) | 60 traces](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) |
82 and retrieve the result: | 61 and retrieve the result: |
83 | 62 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 ```sh | 106 ```sh |
128 mojo_debug device stack | 107 mojo_debug device stack |
129 ``` | 108 ``` |
130 | 109 |
131 ## Development | 110 ## Development |
132 | 111 |
133 The library is canonically developed [in the mojo | 112 The library is canonically developed [in the mojo |
134 repository](https://github.com/domokit/mojo/tree/master/mojo/devtools/common), | 113 repository](https://github.com/domokit/mojo/tree/master/mojo/devtools/common), |
135 https://github.com/domokit/devtools is a mirror allowing to consume it | 114 https://github.com/domokit/devtools is a mirror allowing to consume it |
136 separately. | 115 separately. |
OLD | NEW |