Debug function module for Symbian Development

Source: Internet
Author: User

To view the debug information during Symbian development, you canCodeAdd the following debug module. So that the debug information is saved in the *. txt file.

# Define my_debug
# Ifdef my_debug
# Include <stdio. h>
Static void my_track (const char * Str)
{
File * fp = fopen ("C: // my_track_char.txt", "A + ");
// If (FP = NULL)
//{
// Exit (-1 );
//}
Fprintf (FP, "% S/R/N", STR );
Fclose (FP );
}

Static void my_track (const tdesc & amsg)
{
File * fp = fopen ("C: // my_track_desc.txt", "A + ");
// If (FP = NULL)
//{
// Exit (-1 );
//}
Fwrite (amsg. PTR (), sizeof (INT), amsg. Length (), FP );
Fclose (FP );
}

# Define my_track_number (x, y ){/
File * fp = fopen ("C: // my_track_number.txt", "A + ");/
Fprintf (FP, "Number test :");/
Fprintf (FP, x );/
Fprintf (FP, "= ");/
Fprintf (FP, "% d/R/N", Y );/
Fclose (FP );/
}

# Else

# Include <stdio. h>
Static void my_track (const char * Str)
{
}

# Define my_track_number (x, y)
}

# Endif

 

There are two additional steps:

1: Modify *. MMP file, including the following content

Systeminclude/epoc32/include/libc

2: add the *. MMP File

Library estlib. Lib

 

The debugging text file will be generated in the C:/Symbian/8.0a/s60_2nd_fp2_cw/epoc32/winscw/C directory.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.