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.
Pushed the fix to development branch.
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)
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.
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?
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.
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?
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.
Pull request: https://github.com/appcelerator/titanium_mobile/pull/4972
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
Unable to reproduce as Praveen, Eric, and Hieu as my witness.
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)