I am creating a app for iOS using Air 3.2 and to test and debug I am using the remote debugger via wifi from the device.
When I set a break point in the code, I fire up the app on the iPad, turn on "begin remote debugging session" for as3
50% of the time I get "Breakpoint not set; No executable code at line ###"
40% of the time the break points just don't work at all without any error.
10% of the time it works.
If I shut the app down and fire it and the remote debugger back up, same odds apply that the break points will start working - without recompiling or reinstalling the app.
Question: Why do i get "Breakpoint not set; No executable code at line ###" or have them not work at all the majority of the time, but sometimes they work as expected? Is there a "proper" sequence that I should be doing so that I can get the breakpoints to work every time?
The app never has a problem connecting to the debugger - trace statements and other debugging functions work properly - just the break points fail
The swf is built on the pc using flash.
the ipa is compiled using ADT on the mac due to the use of extensions requiring iOS sdk 5
the debugger is running on the PC (win 7, Flash cs5.5) as it's my primary developement computer.
the iPad connects to the debugger via wifi
there are compiler "CONFIG::" constants in play
starting the app first, or the debugger first doesn't seem to play any effect.
recompiling and reinstalling the app doesn't seem to have any effect.
"remove breakpoints in all as files" and re-adding the break points has no effect
"remove all breakpoints" and re-adding in the fla has no effect
Sorry I am no help here because I have the same problem - I cannot see how this is anything but a bug but there seems to be no way to report a bug without signing up for a load of expense. This is driving me crazy - my breakpoints seem to have a half life of forever despite the fact that I try to clear them while new breakpointsa are ignored. I have tried clearing them all, restating FB, restarting the system but still that break I don't want remains and the one I do want is ignored. No help, just frustration
Before testing/publishing the movie you might want to try deleting your ASO cache from the test menu.
I haven't remote debugged in Flash for a while but you're starting a remote debug session and then are starting the app and typing in the IP address correct? Do you have any firewalls running? Any anti-virus/etc? I'd disable all of them or explicitly add a rule (and a static IP) to the device. Wifi itself isn't the most dependable thing.
For the record I also use both OSX and Win. Win is my main dev box. I mostly use the Mac to compile libraries so I can compile ANEs. I do not sync the ipad to the mac though, I sync them all to the Windows box. In Win7 while USB connected I don't even get a prompt from flash builder to enter an IP, it detects and debugs over USB. I've never had it fail a breakpoint like this.
The difference being I'm debugging over USB, not over wifi. That might be a possible issue, limit or bug.
I will try clearing the aso cache.
I am connecting via ip. The ipa DOES connect to the remote debugging in flash just fine (and my ADT build line is -target-debug -connect xxx.xxx.xxx.xxx so i don't have type the ip every time). It's just ignoring break points.
No firewall or antivirus issues.
I really REALLY wish there was a way to connect via usb as it would be SOOO much faster, but I don't seem to have that option. It's wifi or nothing.
I can tell you safely that Flash Builder connects over USB automagically. I believe I remembered back when I tested in Flash Pro using Quick export for debugging that as long as I was on Win7 and the iPad was recognized (visible in itunes) it connected automatically over USB. I could be wrong.
How good of a signal are you getting over wifi? I really can't tell if they're using TCP or UDP (never network sniffed) but if they're using UDP you could be dropping packets (breakpoints) because of the non-critical protocol as UDP will never rebroadcast a dropped packet where TCP will always ensure integrity.
Have you tried alternate console outputs like maybe FlashDevelop? Do you write all your code still inside the Flash Pro Actions panel?
Signal strength is really good as I am only a couple of feet away from the router.
The project was built entirely using Flash CS5.5 - projects that I have started since have been in FB. I tried to open the fla in FB, but I can't figure out how to get it to start for remote debugging - as I am still kinda new to FB
But regardless... when I start Flash for remote debugging as3 - and then start up the app on the ipad - it does successfully connect to the debug... all my trace statements are appearing and everything is working as it should EXCEPT the breakpoints that I put in the code aren't stopping.
Sometimes it says "Breakpoint not set; No executable code at line" for all the breakpoints in the as files... other times, it doesn't say anything, but the breakpoints that are on valid lines don't trigger a pause.
very very rarely though, it WILL suddenly start doing it. (no code or project changes - just shut the app down, and the debugger, restart both) But if I restart the app, back to square one... only about 1 in every 40 app starts stops on the break points.
If you have Flash Builder I'd quickly convert that project over to FB to get around all these annoying issues. 99% of my projects are all code and all I use Flash Pro for is to build a SWC which I just then import into Flash Builder. So I start an Actionscript for Mobile project, bring over my classes, add the SWC and I'm off to the races. If that's at all possible for you it's the best idea. Then you can profile while you're at it if you have 4.6 Premium.
I've never seen a breakpoint miss in FB.
In FB you don't start a remote debugging session. You hit the debug button and it opens a panel with "profiles". You click the mobile device option on the left and then up above you hit the "New" button to add a new mobile profile. Then when you set this new profile up you can tell it to use the iPad emulator or test on device (using fast export is great). No more IPs in FB over USB, it just waits until you take the IPA from the debug folder, install it in itunes, sync to your ipad and then run the app. It will sense the app starting and commence the debug session.
However, perhaps if the breakpoints continue to give you issues you can do the old fashioned trace() method.. I never lose a trace. Trace what you want at your breakpoint and adjust accordingly. It's not ideal but it's rather complex debugging an app over a device connection as opposed to something running in a VM on the same machine.
Also why aren't you using the built in debugging? Are you using Stage3D or StageWebView or StageVideo or anything that wouldn't let you just debug right in the IDE? I only ended up device testing at the end of the cycle for optimization. Otherwise I used the simulators exclusively.
The project is too big, and there is not enough time to easily convert it over to FB at this time, not witht he learning curve required... The project is nearing the end of it's developement cycle anyway. All future projects are being done in FB.
As for why am I not using the built in debugger... I am using quite a few native extensions... therefor, all compiling must be done on the mac, using the ADT command line. Flash (and FB on pc) don't support them. So I have to do everything through the remote debugger. And flash cs 5.5 doesn't support usb device debugging for ios anyway. When ever I need to test or debug something that is not ANE related, I disable them via CONFIG variable and use the flash debugger... but alot fo the problems I am experiencing and having to test and debug need to be done on the device as they don't happen in the simulator.
I developed 99.9% of the time using FlashDevelop and Flash Pro. I never experienced your remote debugger issues. I can only speak for myself but perhaps because I was so used to basing the majority of my debugging on trace()ing variables in a useful way I never experienced your problem. But it is still a solution in an obviously imperfect world.
I converted a project tens of thousands of lines of code into a FB project in 1 day. It's all if you're used to using frame scripts or not (I do not). I specify one class as my documents base class (back when I used Flash Pro alone) and did everything in code. The library was just something to easily construct large movieclips of interfaces. I guess that's why it was so easy to port to SWC.
Unfortunately even with the extremely aggressive trace()ing I do, I never drop a trace over wifi. You're dropping breakpoints over wifi. Perhaps you can consider the ardituous but functional fix of tracing values near breakpoints which is all breakpoints are for anyhow.