Update sky HACKING.md instructions to use mojo_shell.py.

See #238.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1242453002 .
上级 eb2cef41
...@@ -17,26 +17,19 @@ Running applications ...@@ -17,26 +17,19 @@ Running applications
To run an application on your device, run: To run an application on your device, run:
* ``./mojo/tools/mojodb start out/android_Debug [url]`` * `mojo/devtools/common/mojo_shell --sky [url] --android`
`mojodb` has numerous commands, visible via `mojodb help`. Common ones include: When the shell is running, `mojo/devtools/common/debugger` allows you to
* `mojodb start` BUILD_DIR [url] collect traces, symbolize stack crashes and attach gdb if needed. Refer to the
* `mojodb load` [url] [documentation](https://github.com/domokit/mojo#debugging-tracing-profiling)
* `mojodb stop` for the details.
* `mojodb start_tracing` # Starts recoding a performance trace (use stop_tracing to stop)
* `mojodb print_crash` # Symbolicate the most recent crash from android.
Once `mojodb start` is issued, all subsequent commands will be sent to
the running mojo_shell instance (even on an attached android device).
`mojodb start` reads gn args from the passed build directory to
determine whether its using android, for example.
Running tests Running tests
------------- -------------
Tests are only supported on Linux currently. Tests are only supported on Linux currently.
* ``./sky/tools/test_sky --debug`` * ``sky/tools/test_sky --debug``
* This runs the tests against ``//out/Debug``. If you want to run against * This runs the tests against ``//out/Debug``. If you want to run against
``//out/Release``, omit the ``--debug`` flag. ``//out/Release``, omit the ``--debug`` flag.
...@@ -70,20 +63,22 @@ This document aims to explain how to debug Sky itself. ...@@ -70,20 +63,22 @@ This document aims to explain how to debug Sky itself.
### C++ ### C++
Launch a debug Sky build on Linux as follows (where `app.dart` is the Launch a debug Sky build on Android as usual:
test you are running and trying to debug):
```bash ```
mojodb start --gdb out/Debug app.dart mojo/devtools/common/mojo_shell --sky [url] --android`
mojodb gdb_attach ```
and use the debugger to attach gdb:
```
mojo/devtools/common/debugger gdb attach
``` ```
Once gdb has loaded, hit `c` to start the app. The linux simulator Once gdb has loaded, hit `c` to continue the execution. When your app crashes,
will load (slowly), after spawning many threads. When your app it will pause in the debugger. At that point, regular gdb commands will work:
crashes, it will pause in the debugger. At that point, regular gdb `n` to step over the current statement, `s` to step into the current statement,
commands will work: `n` to step over the current statement, `s` to `f` to step out of the current block, `c` to continue until the next breakpoint
step into the current statement, `f` to step out of the current block, or exception.
`c` to continue until the next breakpoint or exception.
### Dart ### Dart
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册