Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11373] Android Device Debugging: console window fails to display console output after port forward

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2012-10-10T23:46:09.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.0.0, 2012 Sprint 20
Componentsn/a
Labelsandroid-device-debugger, core, qe-and100112
ReporterPayminder Singh
AssigneeBill Dawson
Created2012-09-10T15:20:58.000+0000
Updated2013-01-09T15:29:54.000+0000

Description

Titanium Studio Console output fail to display output results. Steps to Reproduce: 1. Create default project, add sample code:
Ti.API.info('INFO LOGGED');
2. Run 'debug' on Android Device. Port forward message should appear on console. 3. Launch app from device. Actual Result: Titanium Studio console log fail to display the console output Expected Result: Titanium Studio console log display the console output as DDMS or Catlog.

Attachments

FileDateSize
ddms_log.txt2012-09-10T15:21:26.000+0000422331
log.txt2012-09-10T15:21:26.000+000010419
Screen Shot 2012-09-10 at 3.07.54 PM.png2012-09-10T15:21:26.000+000073730

Comments

  1. Kanat Asanbekov 2012-09-18

    Reproducible Tested on: Titanium Studio: 3.0.0.201209171527 Titanium SDK: 3.0.0.v20120918143313 OS: OS X 10.8 (Mountain Lion) Device Tested: HTC EVO (4.0.3)
  2. Payminder Singh 2012-09-20

    There is no special setup required to get the 'port forward' message, it's just a debugging in device process. Same comment for TISTUD-2290
  3. Nam Le 2012-09-24

    I believe this is a platform issue. The log messages are not available via the debug process. The messages do appear in the log cat through. One thing to note is we follow the same process for connecting to the debug for iOS, and the log messages are available.
  4. Bill Dawson 2012-10-04

    Need TISTUD-2388 in order to work on this.
  5. Bill Dawson 2012-10-05

    Studio will also need to be changed, but we also had to change something to give studio the ability to see the logcat on device.

    Testing Notes

    This is for testing without Studio changes, to "prove" that our new builder.py command named "logcat" (which does nothing other than make the device/emulator's logcat available as a separate process available to Studio) works fine.

    In a Terminal window, run the new builder.py like this: (You'll need to provide the path to the builder.py of course):

       > builder.py logcat <android_sdk_location> -d
       
    So for me, for example, I run:
       > "/Library/Application Support/Titanium/mobilesdk/osx/3.0.0/android/builder.py" logcat /Users/bill/android/android-sdk-macosx -d
       

    The -d means device. You could alternatively make it -e for emulator or -s .

    Leave it running.

    Use Studio to install an app that contains a Ti.API.info("whatever you want"); statement in it on your attached device or running emulator.

    Run the app on the device.

    Check the terminal window that has logcat running -- it should show the info (or debug or whatever) statement.

    Go to a separate Terminal window.

    Run ps -e and find the PID of the python process running builder.py with the "devicelog" command.

    Run kill -3 [pid].

    Switch back over to the Terminal window where logcat was running. It should show a message that a signal 3 was received and it was terminated.

  6. Nam Le 2012-10-10

    Reopened the wrong ticket
  7. Nam Le 2012-10-11

    Bill, this works fine, but can you return the messages from the builder.py process that launched the debug process? Currently studio has to hold on to two processes, one for the install on device and the other for logcat. The install on the device process does not output any messages.
  8. Nam Le 2012-10-11

    On further inspection, the Debug on emulator workflow is very similar, so this is fine

JSON Source