Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15703] iOS: Debugger - Debugger does not work with iOS

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2013-11-23T01:55:12.000+0000
Affected Version/sRelease 3.2.0
Fix Version/s2013 Sprint 23, 2013 Sprint 23 Core, Release 3.2.0
ComponentsiOS
Labelsdebugger, qe-3.2.0, qe-closed-3.2.0, qe-testadded, regression
ReporterOlga Romero
AssigneeChris Barber
Created2013-11-06T19:30:37.000+0000
Updated2014-02-25T18:19:32.000+0000

Description

Details

Debugging does not work on iOS simulators and iOS devices. *This is a regression since this worked with 3.1.3.GA stack.*

To reproduce

1. Create a default Titanium or Alloy project 2. Add a break point to the following places: In the default Alloy app, add break point in index.js at line 2 (e.g. alert($.label.text)) In the default Titanium app, add this code and add a break point at the alert
label1.addEventListener('click', function(e){
     // break point on the alert line
	alert('clicked');
});
3. Next, debug to either iOS simulator or iOS device

Actual result

Debugging to iOS simulator: if you click on the 'I am Window 1' label, studio will not hit that break point. Debugging to iOS device: Debug on iOS device dialog will stall (see debug_device.png) and not app will appear on device.

Attachments

FileDateSize
debug_device.png2013-11-06T20:02:49.000+0000200711
log.txt2013-11-06T19:30:37.000+00001978

Comments

  1. Michael Xia 2013-11-07

    Pushed the fix to development branch.
  2. Wilson Luu 2013-11-07

    Reopening ticket. Debugger still does not work with iOS. Tested on: Titanium Studio, build: 3.2.0.201311070117 SDK build: 3.2.0.v20131107104043 Ti CLI: 3.2.0 master (4c816f21d7d9360659d77e9a6a994992ef880b72) Xcode: 5.0.1 Device: iphone 5 (6.1.3), iphone 5s (7.0.2), iOS Simulator (6.1, 7.0.3)
  3. Christopher Williams 2013-11-11

    This is working for me with iOS simulators. I tried iPhone Retina 4-inch and iPad Retina 64-bit with both a Titanium project and a default Alloy one. I did not try on-device debugging yet.
  4. Christopher Williams 2013-11-12

    So, I'm seeing broken behavior on the device. I tried debugging straight to my device. There's a couple issues: - The progress dialog never advances. We may need to update the strings we're sniffing for again - It looks like the CLI process exits once the app gets installed to the device, so I'm assuming that means the debug session gets cut off then?
  5. Christopher Williams 2013-11-12

    I can easily fix the output sniffing so the progress moves forward on the dialog, but I can't seem to get the debugger to connect at all. It just keeps trying to find the device and connect and never does.
  6. Christopher Williams 2013-11-12

    I've spent a ton of time on this, and I just cannot get debug on device to work. I never get the initial handshake UDP packet sent from the app over to studio's debugger. I have no idea why not. Hopefully someone has some knowledge of how to debug this to see if the app is sending the UDP packet and doing what it's supposed to do?
  7. Christopher Williams 2013-11-12

    Related: I noticed we gather the list of the host machine (studio is on) IPs and set them on the launch config when we generate it. I modified our launching behavior to gather this listing just before we call to build and pass it along to the build/app. This way it makes it more likely to have a good/updated set of IPs for the app to send the UDP packets to.
  8. Chris Barber 2013-11-14

    Pull request: https://github.com/appcelerator/titanium_mobile/pull/4972
  9. Eric Merriman 2013-11-21

    When placing a breakpoint in the eventListener for label1 from the attached code, the breakpoint is ignored when clicking on the label. Occurs with: SDK 3.2.0.v20131119142443 Titanium Studio, build: 3.2.0.201311200322
  10. Chris Barber 2013-11-23

    Unable to reproduce as Praveen, Eric, and Hieu as my witness.
  11. Wilson Luu 2013-12-12

    Closing ticket as fixed. Verified I was able to debug on simulator and device. Tested on: Appcelerator Studio, build: 3.2.0.201312101708 SDK build: 3.2.0.v20131210191510 CLI: 3.2.0-cr3 Alloy: 1.3.0-cr Xcode: 5.0.2 Device: iphone simulator (6.1, 7.0.3), iphone 5s (7.0), iphone 5 (6.1.3)

JSON Source