none
Debug Messages for Release build type Image not working RRS feed

  • Question

  • I'm trying to incorporate DEBUG Messages in my application. The platform used is Win CE 6.0 and it's a native application.

    I could get the RETAIL Messages working and could see them in my debug output window of Platform Builder but the DEBUG Messages are not getting printed. On further investigating I found that the DEBUG Messages were excluded from the code during the compilation - As i couldn't step through them during debugging. Also the Debug zone are defined properly as I could see them from the development workstation.

    The image I'm using is configured for Release build with Kernel Debugger and KTIL enabled. The ship build settings are disabled.

    What possibly could be the problem? Do I need to have a Debug Image for Debug Messages ?

    Also, It would help if someone can refer a article/document for the kind of optimization differences in Debug and Release builds.

    Thanks in advance

    Apoorv

    Friday, October 7, 2011 8:17 AM

Answers

  • Yes, DEBUGMSG AND RETAILMSG are both outputted in a Debug Kernel Build

    ONLY RETAILMSG are outputted in a Retail Kernel Build

    NO messages are outputted in a Shipbuild Kernel Build

     

    To help you make proper use of debug messages and their zones I created some templates that you may find very useful: http://guruce.com/blogpost/atemplatefordebugmessages

    To use the templates simply download the ZIP file containing the templates and add DebugZones.h and DebugZones.cpp to your project. Then call the RETAILREGISTERZONES macro with the proper parameter and configure the DebugZones.h file. It's as easy as that (in case you don't want to read the entire article).


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.

    Friday, October 7, 2011 10:01 AM
    Moderator

All replies

  • Yes, DEBUGMSG AND RETAILMSG are both outputted in a Debug Kernel Build

    ONLY RETAILMSG are outputted in a Retail Kernel Build

    NO messages are outputted in a Shipbuild Kernel Build

     

    To help you make proper use of debug messages and their zones I created some templates that you may find very useful: http://guruce.com/blogpost/atemplatefordebugmessages

    To use the templates simply download the ZIP file containing the templates and add DebugZones.h and DebugZones.cpp to your project. Then call the RETAILREGISTERZONES macro with the proper parameter and configure the DebugZones.h file. It's as easy as that (in case you don't want to read the entire article).


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.

    Friday, October 7, 2011 10:01 AM
    Moderator
  • Thanks Michael

    I have already read your blog and template and they helped a lot in understanding Debug Messages.

    Now I'm planning to use Debug Zones with RETAILMSG as I do need different zones for different modules in the application. The CE_Base team blog states that it's not common though possible, can you think of any possible pitfalls for this approach.

    Thanks for your help

    Apoorv

    Friday, October 7, 2011 10:29 AM
  • No, that just works and is something I use a lot as well. My debug message templates already use RETAILMSG's so you don't have to do anything more to get that to work.

     

    Of course, to be able to set the debugzones at runtime in a retail kernel you need a KITL connection or simply a custom tool that can set the zone parameter. It's nothing more than an exported variable so no rocket science...

    I'm actually using my templates for all sorts of projects, not only CE projects. I've even used it in some microcontroller projects!


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.
    Friday, October 7, 2011 12:59 PM
    Moderator