Extended panic code
If your application generates a panic it will be closed and an error note is shown by the OS: "Program closed:/n%S" where %S is your application's name.In emulator, if just in time debugging is enabled, a panic will launch the debugger instead of displaying a panic note and terminating the thread. Some Symbian Software Development Kit releases have just in time debugging enabled by default. You can disable it by editing %EPOCROOT%\epoc32\data\epoc.ini and making sure the following line exists in the file:
S60 1st and 2nd Edition
To get the emulator/device display the reason and error code for panics, create a zero-sized file named ErrRd (no file name extension) under the PC's directory %EPOCROOT%\epoc32\wins[cw|b]\c\system\bootdata\.
On the device, you should create a zero-sized file ErrRd (no file name extension) under the directory c:\system\bootdata\. You can use a file explorer application (for instance, FExplorer) to create the file, or if none is available, use a signed sis file.
S60 3rd Edition and later
To get the emulator display the reason and error code for panics, start the emulator, then open its Tools -> Preferences menu, and finally make sure the "Extended panic code file" option is checked on the C++ Debug tab. (This has the effect of creating a zero-sized file named ErrRd (no file name extension) under the PC's directory %EPOCROOT%\epoc32\wins[cw|b]\c\resource\.)
On the device, you should create a zero-sized file ErrRd (no file name extension) under the directory c:\resource\. You can use a file explorer application (for instance, YBrowser) to create the file, or if none is available, deploy the file through a SIS file. In case you don't want to use ErrRd, then you could also use Y-Tasks Crash monitor or Panic Observer.
Once this file is created, the error note shown by the OS would look like: "Program closed:/n%S/n%S %d" where the second %S is replaced by the panic reason (for example, USER, KERN-EXEC, etc.) and %d would be replaced by the panic code.
A quick search in SDK's help and you will find a hint on the kind of programming error you should be hunting for in your code.
When reporting an application crash, either on Nokia Developer's Discussion Boards or to Nokia Developer's Technical Support service, please add the panic reason and code to the problem description.
Refer to the following link for: Symbian OS Error Codes.
The same trick will also enable the InfoMsg API which allows developers to print debug information in a pop-up info note showing in the top left right corner of the screen. See below such a info print as displayed by S60 5.0's FEP
CEikonEnv::Static()->InfoMsg(_L("iFnKeyState = EFnKeyLock"));
Have you activated the "Extended panic code" in the emulator but it does not appear to work? See Running the emulator from Carbide.c++.
You cannot find any reference to the identified panic in the SDK (documentation and/or header files)? Add the panic reason and code to the end of Undocumented Symbian OS and S60 panics.