diff --git a/engine/src/flutter/tools/android_library_cacher.py b/engine/src/flutter/tools/android_library_cacher.py index db80d18cf1..564448a050 100755 --- a/engine/src/flutter/tools/android_library_cacher.py +++ b/engine/src/flutter/tools/android_library_cacher.py @@ -4,11 +4,12 @@ # found in the LICENSE file. import argparse -import re -import sys -import os import logging +import os +import re +import skypy.paths import subprocess +import sys SRC_ROOT = skypy.paths.Paths('ignored').src_root ADB_PATH = os.path.join(SRC_ROOT, diff --git a/engine/src/flutter/tools/skydb b/engine/src/flutter/tools/skydb index 66023c96dd..67e951a042 100755 --- a/engine/src/flutter/tools/skydb +++ b/engine/src/flutter/tools/skydb @@ -126,7 +126,7 @@ class SkyDebugger(object): '--args-for=mojo:native_viewport_service --use-osmesa') if is_android and args.gdb: - shell_args.append('--wait_for_debugger') + shell_args.append('--wait-for-debugger') if 'remote_sky_server_port' in self.pids: shell_command = self._wrap_for_android(shell_args) @@ -180,6 +180,11 @@ class SkyDebugger(object): gn_args = gn_args_from_build_dir(self.paths.build_dir) is_android = 'android_sdk_version' in gn_args + if is_android and args.gdb and not 'is_debug' in gn_args: + # FIXME: We don't include gdbserver in the release APK... + print "Cannot debug Release builds on Android" + sys.exit(2) + sky_server = self.sky_server_for_args(args) self.pids['sky_server_pid'] = sky_server.start() self.pids['sky_server_port'] = sky_server.port @@ -265,7 +270,7 @@ class SkyDebugger(object): # We could just run gdb_attach_command here, but when I do that # it auto-suspends in my zsh. Unclear why. # self.gdb_attach_command(args) - print "Run skydb gdb_attach to attach." + print "Run 'skydb gdb_attach' to attach." def _kill_if_exists(self, key, name): pid = self.pids.pop(key, None)