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.