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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 ```sh | 96 ```sh |
97 (gdb) update-symbols | 97 (gdb) update-symbols |
98 ``` | 98 ``` |
99 | 99 |
100 If you only want to update symbols for the current selected thread (for example, | 100 If you only want to update symbols for the current selected thread (for example, |
101 after changing threads), use the `current` option: | 101 after changing threads), use the `current` option: |
102 ```sh | 102 ```sh |
103 (gdb) update-symbols current | 103 (gdb) update-symbols current |
104 ``` | 104 ``` |
105 | 105 |
| 106 If you want to debug the startup of your application, you can pass |
| 107 `--wait-for-debugger` to `mojo_run` to have the Mojo Shell stop and wait to be |
| 108 attached by `gdb` before continuing. |
| 109 |
106 #### Android crash stacks | 110 #### Android crash stacks |
107 When Mojo shell crashes on Android ("Unfortunately, Mojo shell has stopped.") | 111 When Mojo shell crashes on Android ("Unfortunately, Mojo shell has stopped.") |
108 due to a crash in native code, `mojo_debug` can be used to find and symbolize | 112 due to a crash in native code, `mojo_debug` can be used to find and symbolize |
109 the stack trace present in the device log: | 113 the stack trace present in the device log: |
110 | 114 |
111 ```sh | 115 ```sh |
112 mojo_debug device stack | 116 mojo_debug device stack |
113 ``` | 117 ``` |
114 | 118 |
115 ### devtoolslib | 119 ### devtoolslib |
116 | 120 |
117 **devtoolslib** is a Python module containing the core scripting functionality | 121 **devtoolslib** is a Python module containing the core scripting functionality |
118 for running Mojo apps: shell abstraction with implementations for Android and | 122 for running Mojo apps: shell abstraction with implementations for Android and |
119 Linux and support for apptest frameworks. The executable scripts in devtools are | 123 Linux and support for apptest frameworks. The executable scripts in devtools are |
120 based on this module. One can also choose to embed the functionality provided by | 124 based on this module. One can also choose to embed the functionality provided by |
121 **devtoolslib** in their own wrapper. | 125 **devtoolslib** in their own wrapper. |
122 | 126 |
123 ## Development | 127 ## Development |
124 | 128 |
125 The library is canonically developed [in the mojo | 129 The library is canonically developed [in the mojo |
126 repository](https://github.com/domokit/mojo/tree/master/mojo/devtools/common), | 130 repository](https://github.com/domokit/mojo/tree/master/mojo/devtools/common), |
127 https://github.com/domokit/devtools is a mirror allowing to consume it | 131 https://github.com/domokit/devtools is a mirror allowing to consume it |
128 separately. | 132 separately. |
OLD | NEW |