New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
== 2014-09-17 == #13
== 2014-09-17 == #13
Conversation
v1.1.3x * Added support for restarting with debugger enabled.
v1.1.3-x1 * cleaned up code & removed unnecessary functions.
v1.1.3-x2 * removed unused imports and unneeded info line.
This is awesome! Thanks! |
Welcome, and thanks for writing the original plugin :) Not sure i did it all right let me know if stuff needs to be changed or anything else for that matter that is wrong with it. I do get a no device found error when i launch it the first time but not sure if its how i set up to compile the plugin or not. Still new to coding for it (idea/intellij environment) :) Have a good one. |
Just to update, on the first run i get ADB IDEA: No Device found, and on the second try it runs but i get this as errors: EVENT LOG in Android Studio (Beta) 0.8.9Throwable Throwable detailsRead access is allowed from event dispatch thread or inside read-action only (see com.intellij.openapi.application.Application.runReadAction()) java.lang.Throwable java.lang.Throwable java.lang.Throwable java.lang.Throwable java.lang.Throwable java.lang.Throwable java.lang.Throwable java.lang.Throwable java.lang.Throwable java.lang.Throwable java.lang.Throwable |
v1.1.3-x3 * Fixed error: "ADB IDEA: No Device found" * Fixed error: Throwable. Read access is allowed from event dispatch thread or inside read-action only.
v1.1.3-x4 * add scan for proper device client with fallback to using package name to retrieve client.
v1.1.3-x5 * added disable of package when unable to get client info.
v1.1.3-x6 * Modified plugin.xml to move adb idea actions to main menu and added keymap entries.
v1.1.3-x7 * Moved "Adb Idea" to main menu after tools * added toolbar icons for kill/run/run with debug actions
I've made a number of mods since yesterday, including adding keymaps for each of the actions, moving the menu from the android tools submenu to the main menu, and adding the three main actions i use (stop, run, run with debug) to the toolbar. |
v1.1.3-x8 * removed code that attempted to hook the logcat console to the debugger.
Removed code that was attempting to hook in the logcat window with the debugger. Don't think i'll change anything else till i figure out how to get the logcat to show like when using run or debug actions from the ide. |
So far it looks pretty good! I had to change one line so that it would compile against android studio 0.8.10. But before I merge it, we have to find out why we can't do a restart&debug on the first try. |
info(String.format("Target device: " + device.getName(), ProcessOutputTypes.STDOUT)); | ||
try { | ||
AndroidDebugBridge bridge = AndroidDebugBridge.getBridge(); | ||
if ((bridge != null) && (AndroidSdkUtils.canDdmsBeCorrupted(bridge))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AndroidSdkUtils.canDdmsBeCorrupted(bridge)
doesn't exist in android studio 0.8.10.
The correct method now seems to be: AdbService.canDdmsBeCorrupted(bridge)
I'm guessing you're on the canary side of things, will see how i can try to make this work. |
v1.1.5 * Updated plugins.xml * removed unnecessary info bubbles. * fixed canDdmsBeCorrupted for AS 0.8.10 & 0.8.11 * removed else check on device.hasClients
For AS 0.8.9 i bumped the build number to 1.1.4 and for 0.8.10 and after bumped it to 1.1.5, removed unnecessary info bubbles and switched ddms test to use AdbServices as per your suggestion. I guess users of 0.8.9 would have to use the 1.1.4 version which would mean making two new builds. |
v1.1.5 * added code to try to disable an existing debugger if found before start a new session.
added some code back in to try to disable an existing debugger session if it finds one before launching a new instance to try and cut down too many instances floating around. |
v1.1.6 * added reboot action * minor fixes
Added a reboot action. Still can't figure out why on the first run (right after starting it up) of the IDE i get no device found. Also not quite sure how to get a client added if it returns null on device. |
v1.1.6 * Added device reboot action * Code cleanup for debugger actions * Added check for activateDdmsIfNecessary
Had some time to check it out. Turns out that we can put a listener on the client list, that's how the "Attach debugger to Android process" action works. Take a look at the dialog here: https://android.googlesource.com/platform/tools/adt/idea/+/7e659c388d08291ab9eeb954827e74aa6a8f5b0d/android/src/org/jetbrains/android/actions/AndroidProcessChooserDialog.java So we should put a listener on the clients and then attach as soon as we get the list. As for the multiple builds, My goal, at least in the short term, is to support Intellij 13 and up and android studio 0.5.6+. I won't put up two different builds. So the way I usually work is to target the latest version and then reflectively call methods for older versions (assuming that the change is minor... e.g. a feature that was moved or rename). I'll take a look when it is fixed. |
I understand, unfortunately i've run out of time to work on this for now. I'd hope you'd of looked at it before today, oh well. Works well enough for me for now when i get more time i may revisit this. |
Ok no problem, I'll take it from here. I'll keep you posted when the new version is out! |
Thanks, hopefully i can get back to this in a few weeks. |
* BUGFIX: Sometimes can't start or restart app with debugger. * BUGFIX: No quick action popup
added text
…estart with Debugger option
FYI i finally found time to work a bit on this and created a preliminary patch to add debugger support when restarting with adb-idea. Let me know if you have any questions.