| OLD | NEW |
| 1 Hacking on Sky | 1 Hacking on Sky |
| 2 ============== | 2 ============== |
| 3 | 3 |
| 4 Building | 4 Building |
| 5 -------- | 5 -------- |
| 6 | 6 |
| 7 * Follow the setup & build instructions for [Mojo](https://github.com/domokit/mo
jo) | 7 * Follow the setup & build instructions for [Mojo](https://github.com/domokit/mo
jo) |
| 8 | 8 |
| 9 The build directory will be `out/Debug` for Linux debug builds, and | 9 The build directory will be `out/Debug` for Linux debug builds, and |
| 10 `out/Release` for Linux release builds. For Android builds, prefix | 10 `out/Release` for Linux release builds. For Android builds, prefix |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 We recommend using the [Dart | 59 We recommend using the [Dart |
| 60 ``test``](https://pub.dartlang.org/packages/test) testing framework. | 60 ``test``](https://pub.dartlang.org/packages/test) testing framework. |
| 61 See [``sky/tests/raw/color_bounds.dart``](tests/raw/color_bounds.dart) | 61 See [``sky/tests/raw/color_bounds.dart``](tests/raw/color_bounds.dart) |
| 62 for an example. | 62 for an example. |
| 63 | 63 |
| 64 Debugging Sky | 64 Debugging Sky |
| 65 ------------- | 65 ------------- |
| 66 | 66 |
| 67 This document aims to explain how to debug Sky itself. | 67 This document aims to explain how to debug Sky itself. |
| 68 | 68 |
| 69 === C++ | 69 ### C++ |
| 70 | 70 |
| 71 Launch a debug Sky build on Linux as follows (where `app.dart` is the | 71 Launch a debug Sky build on Linux as follows (where `app.dart` is the |
| 72 test you are running and trying to debug): | 72 test you are running and trying to debug): |
| 73 | 73 |
| 74 ```bash | 74 ```bash |
| 75 mojodb start --gdb out/Debug app.dart | 75 mojodb start --gdb out/Debug app.dart |
| 76 mojodb gdb_attach | 76 mojodb gdb_attach |
| 77 ``` | 77 ``` |
| 78 | 78 |
| 79 === Dart | 79 Once gdb has loaded, hit `c` to start the app. The linux simulator |
| 80 will load (slowly), after spawning many threads. When your app |
| 81 crashes, it will pause in the debugger. At that point, regular gdb |
| 82 commands will work: `n` to step over the current statement, `s` to |
| 83 step into the current statement, `f` to step out of the current block, |
| 84 `c` to continue until the next breakpoint or exception. |
| 85 |
| 86 ### Dart |
| 80 | 87 |
| 81 Use Observatory. | 88 Use Observatory. |
| OLD | NEW |