how to debug runtime error that doesn't occur on simulator, just on device?

It might not be clear but debug symbols are only stripped from the compiled Lua code when doing “distribution” builds.  In Corona terms this means, on the iPhone, using a Code Signing Identity whose name begins with “iPhone Distribution:” and for Android it means using a keystore with any name other than “Debug” (I understand these are arbitrary definitions but we had to go with something).

This means you can’t submit unstripped code to the app stores but you can run on the device with full debug info (just use an appropriate cert when building).

Just so I understand correctly, is the request to be able to distribute apps via the app stores with debug info in them?  Or were the conditions under which stripping occurs unclear?

My 20c worth.  From a user requirement point of view re a development platform my main point would be:  

    “Ability to quickly/efficiently track down bugs in general”.  

The thing that sticks out is there is some functionality that you can’t test on the simulator, but when testing on the device you hit the symbols issue.  This would seem to imply the need for the simulator to simulate all functionality (including plugins etc) to meet the user requirement.   What do you think?  (i.e. just from a “idealist” point of view)   i.e. should there be more focus on the simulator?  (I’m not sure of the answer, just asking the question)

As I said, you *can* run with debug symbols on the device, you just can’t distribute to the app stores with debug symbols.

sorry Perry - I misread the thread (was just skimming through forum responses) - thanks for pointing this out - I’ll start changing my process when testing on the device based on the Code Signing Identify…thanks again

We’ve added a build.settings parameter to allow distribution builds with debug info in them to be made. It’ll be available in Daily Build 2014.2221 and later.

This is the documentation …

Normally distribution builds of an app (those intended for app stores) have Lua debug info stripped from the compiled code while development builds are not stripped. Generally stripping debug symbols is preferred for distribution because it reduces app size and provides a small performance gain but the tradeoffs entirely depend on the type of app and how you like to do error reporting.

On the iPhone, distribution builds are made by using a Code Signing Identity whose name begins with “iPhone Distribution:” and on Android they are made by using a keystore with any name other than “Debug”.

Sometimes it can be useful to have debug symbols available in distribution builds of your app. This means you get more detail in stack traces and runtime error messages. The neverStripDebugInfo setting can be used to turn off debug symbol stripping altogether. In theory, there’s no reason why an app built with this setting could not be submitted to an app store but policies vary and there are no guarantees. The debug info may reveal details of your app that you would prefer to remain proprietary.

settings = {     build =     {         neverStripDebugInfo = true     } }

Perry, that’s great news! This option is exactly what I was looking for - leaving debug symbols in for distribution builds.  The bugs we face are sometimes hard to reproduce, both in simulator or by manually testing debug device builds, so the only option we had was verbose logging on the user devices in the wild. Thanks a lot!

Has this been added to enterprise as well? It is not working for me on 2223

Is the  neverStripDebugInfo  option available for both Android and iOS? 

Yes, both.

OK quick question. 

Are there any security issues if I don’t strip debug info? 

 

Is the  neverStripDebugInfo  option available for both Android and iOS? 

Yes, both.

OK quick question. 

Are there any security issues if I don’t strip debug info?