SDK 1.1.1 - Difference between debug and non debug builds?

A debug build for a .prg can be up to 5x the size of a non debug build, so what's there that's used?

Will things like Sys.println() (to <appname>.txt) not work in a non-debug build? Will CIQ_LOG.txt not be written in a non debug build?

Is there more error checking in a debug build?

Is the debug stuff there for future enhancements to debugging and not really used today?

If someone is helping to test something, is there an advantage to providing a debug version of the .prg vs a non debug version?
  • The debug build includes information needed to print the callstack and the symbol name for symbol not found errors. Sys.println() and CIQ_LOG.TXT will still work in release builds as they are controlled by the product firmware and not the PRG. With a debug build you'll get something like this on an error:

    Error: Unexpected Type
    in drawCircle() in /Users/me/CIQ/WatchApp/source/View.mc:32
    in onUpdate() in /Users/me/CIQ/WatchApp/source/View.mc:68


    In a release build you'll get

    Error: Unexpected Type
    @PC=0x000392
    @PC=0x000548
  • Thanks for the info. In the case where you don't get the stack trace, is there any way the "@PC=" can be used to get any info? in other words, is there a way that it can be mapped back to the code?
  • You can use the <app>.debug.xml file that's in the same folder as your PRG when it is built.
  • You can use the <app>.debug.xml file that's in the same folder as your PRG when it is built.


    So this file is also valid for a non-debug build? (as least as far as the .prg itself?) There isn't a new one when you do an "export" with non-debug builds that I can find.
  • Former Member
    Former Member over 10 years ago
    Thanks for the info. In the case where you don't get the stack trace, is there any way the "@PC=" can be used to get any info? in other words, is there a way that it can be mapped back to the code?

    BlackDogIt (assuming I got the name right) has posted an addon for eclipse that will map @PC to source code. I think you should find it quite easily with a search on google or possibly even github.
  • There's an update site for the plug-in: https://github.com/blackdogit/connectiq-monkeyc/wiki/Installing.

    Disclaimer: BlackDogIt is not associated with Garmin so use at your own risk.