From 8e82f761193313d24fff41581f2b988c053f3bc3 Mon Sep 17 00:00:00 2001 From: Hixie Date: Mon, 22 Jun 2015 15:01:13 -0700 Subject: [PATCH] Add more details to how to debug with gdb. TBR=eseidel Review URL: https://codereview.chromium.org/1196223004. --- engine/src/flutter/HACKING.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/engine/src/flutter/HACKING.md b/engine/src/flutter/HACKING.md index de70d7d47d..90b45578d7 100644 --- a/engine/src/flutter/HACKING.md +++ b/engine/src/flutter/HACKING.md @@ -66,7 +66,7 @@ Debugging Sky 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 test you are running and trying to debug): @@ -76,6 +76,13 @@ mojodb start --gdb out/Debug app.dart mojodb gdb_attach ``` -=== Dart +Once gdb has loaded, hit `c` to start the app. The linux simulator +will load (slowly), after spawning many threads. When your app +crashes, it will pause in the debugger. At that point, regular gdb +commands will work: `n` to step over the current statement, `s` to +step into the current statement, `f` to step out of the current block, +`c` to continue until the next breakpoint or exception. + +### Dart Use Observatory.