全部博文(237)
分类: C/C++
2010-01-12 10:09:32
The output of RDebug in emulator is written to:
For S60 3rd Edition, there are two options in the \epoc32\data\epoc.ini file to enable or disable RDebug output, that is:
The following code shows the content of epoc.ini with LogToFile and LogToDebugger enabled:
LogToFile 1
LogToDebugger 1
Note: If changing the epoc.ini is something that you feel
comfortable with, then try it. You can also control the same settings
through the emulator's window menu. Select Tools -> Preferences. The
logging options can be found in the General tab.
Viewing RDebug output in the Carbide.c++ IDE can be done by enabling "View process output". To enable it, right click project name and select Debug as | Debug.... Click the Debugger tab and enable "View process output" (see picture below).
After the "View process output" option has been enabled, debug the project. To display the debug messages, click Open Console and select the Debug Messages menu. The picture below shows the output of RDebug in the Carbide.c++ IDE.
Carbide.c++ is an Eclipse based IDE. The advantage of this is that many existing Eclipse plug-ins can be easily integrated with Carbide.c++. One such example is the plug-in, a tool that can dynamically load a log file, parse it according to user defined rules, and then display it in real time with customised formatting.
Plug-in configuration example:
Viewing the RDebug messages:
Here you can see how the plug-in can be used to highlight the log messages sent by your application, recognised as starting with the keyword RDebug.
RDebug::Print( _L("RDebug Hello") );When debugging on device with TRK:
Debug configuration -> Debugger tab:
It is also possible to view debug output without any IDE or debugger attached. This can speed up launch times for the emulator (for example, if you are using Just-in-time debugging as described in ).
For this, you can use several tools that show Windows debug strings, such as from Microsoft. DebugView also has additional features such as highlighting or excluding strings with a particular pattern.
One thing to keep in mind is that the debug output can occasionally come from other processes in your system, not just the Symbian emulator, so with a tool like DebugView you can capture other strings not related to the application you are debugging. Again, filtering can be very helpful here.
epocwind.out is a normal text file which is appended by the emulator so you can open it with any text editor. To be able to see the log prints as they come, you can use the freeware program. It is a port of the unix tail program that prints the "tail" of a file.
Create a bat file as follows:
tail -f %temp%\epocwind.outThis opens a dos-prompt to show the log prints as they come. It can be closed by pressing Ctrl-C.