Re: output to IDE console
There is no concept for such console in Symbian. Java always runs on top of an operating system (which may have a default console), while Symbian is an operating system itself.
Strictly said, there is a Windows Console target (winc), that is what the SDK tools use (many of them are Symbian applications indeed). However the winc libraries are not present in current SDK-s, you can find a couple .dll-s at most.
Re: output to IDE console
[QUOTE]There is no concept for such console in Symbian. Java always runs on top of an operating system (which may have a default console), while Symbian is an operating system itself.[/QUOTE]
Thanks for replying me but I don't quite understand what you are talking about. I means that in a application written in standard c++ I could print out the debug output to IDE console by using the function cout("debug info....")
so, what I want is something like cout of standard c++ in symbian c++, then I could redirect to the IDE console (which is better for viewing my debug info)
I found the RDebug but it just works in debug mode. launching an symbian app in debug mode quite take a time (it's annoy me). that would be better if I run it then print what I want to see in the IDE console.
any one could guides me how I can do this or tells me some thing could help me do this.
thanks
Re: output to IDE console
Simply there is no redirectable console in Symbian itself. There is some support for creating 'text mode' code, but it involves explicit creation of a graphical console object, which have console-like methods, like Printf or Getch. But it is not stdio, or cout-like, and it is not redirectable.
There is some support for standard C++, via the Open C/C++ API set, which has some console emulation in fact, but if you are using that, you are not programming in Symbian C++. [url]http://www.developer.nokia.com/Community/Wiki/Archived:Redirecting_stdin_and_stdout_streams_in_Open_C[/url] describes some kind of redirection of it.
RDebug exists exactly because there is nothing else.
Re: output to IDE console
thanks a lot for replying me. so, is there any library or plug in for the sdk could help me.I mean, when I run my app in debug mode, the RDebug::Print direct out put to the IDE console, but when I run in normal mode, the RDebug::Print is still there but nothing in printed out to the console. like the emulator just ignore it. is there any way to config the sdk then when I run my app in normal mode, it print to the console too (like in debug mode). what annoys me is that when run in debug mode,the emulator take to much time to launch,makes me have to wait ( up to 1-2 minutes , leading me to hate the debug mode in mobile emulators, the same thing in j2me )
please help, I'm new to symbian c++
Re: output to IDE console
Some one please help.
could you tell me how to print to Systemout of Diagnostics in symbian c++
any information is appreciated.
thanks
how to print to Systemout of Diagnostics in symbian c++
any one could tell me how to print to the system out of Diagnostics tool of the sdk emulator?
Re: output to IDE console
[QUOTE=harunaga;909192]thanks a lot for replying me. so, is there any library or plug in for the sdk could help me.[/QUOTE]You can check the Open C console documentation, if it can be redirected to something else than a file.[QUOTE]I mean, when I run my app in debug mode, the RDebug::Print direct out put to the IDE console, but when I run in normal mode, the RDebug::Print is still there but nothing in printed out to the console.like the emulator just ignore it. is there any way to config the sdk then when I run my app in normal mode, it print to the console too (like in debug mode). what annoys me is that when run in debug mode,the emulator take to much time to launch,makes me have to wait ( up to 1-2 minutes , leading me to hate the debug mode in mobile emulators, the same thing in j2me )[/QUOTE]The delays are mostly caused by RDebug's activity. This is a (if not 'the') major difference between debug and non-debug execution.
Side note: you can keep the emulator running even during rebuilds of your code, just exit from the application itself. You may have to modify the launch target (in Run/Debug configuration) to epoc.exe, so the emulated phone will start up, and you will launch your code via its icon in the menu (if you are experimenting with console code, here is how you can create an icon for them: [url]http://www.developer.nokia.com/Community/Wiki/Executing_Console_Applications_on_Devices[/url]). This way you only have to shut down the emulator when you are changing resource files, not just the executable.
Note that old-school file-based logging is still a powerful tool. You can simply use any kind of file and there is also a specialized API, RFileLogger.
Re: how to print to Systemout of Diagnostics in symbian c++
[QUOTE=harunaga;909259]any one could tell me how to print to the system out of Diagnostics tool of the sdk emulator?[/QUOTE]
You can follow these steps to see the output in the diagnostics:
1) Include the following library in the mmp file : EcmtClient.lib
2) Declare the object of REcmt as :
#ifdef _DEBUG
#include <EcmtClient.h>
REcmt iEcmt;
#endif
(you can write this in the AppUi(at the top), i did this way)
3) Now use this object anywhere you like as:
#ifdef _DEBUG
#include <EcmtClient.h>
extern REcmt iEcmt;
#endif
To print on diagnostics:
iEcmt.Write(_L("Debug"));
Re: output to IDE console
[QUOTE=wizard_hu_;909270]You can check the Open C console documentation, if it can be redirected to something else than a file.The delays are mostly caused by RDebug's activity. This is a (if not 'the') major difference between debug and non-debug execution.
Side note: you can keep the emulator running even during rebuilds of your code, just exit from the application itself. You may have to modify the launch target (in Run/Debug configuration) to epoc.exe, so the emulated phone will start up, and you will launch your code via its icon in the menu (if you are experimenting with console code, here is how you can create an icon for them: [url]http://www.developer.nokia.com/Community/Wiki/Executing_Console_Applications_on_Devices[/url]). This way you only have to shut down the emulator when you are changing resource files, not just the executable.
Note that old-school file-based logging is still a powerful tool. You can simply use any kind of file and there is also a specialized API, RFileLogger.[/QUOTE]
thanks. it helps me alot
Re: how to print to Systemout of Diagnostics in symbian c++
[QUOTE=vineet.jain;909282]You can follow these steps to see the output in the diagnostics:
1) Include the following library in the mmp file : EcmtClient.lib
2) Declare the object of REcmt as :
#ifdef _DEBUG
#include <EcmtClient.h>
REcmt iEcmt;
#endif
(you can write this in the AppUi(at the top), i did this way)
3) Now use this object anywhere you like as:
#ifdef _DEBUG
#include <EcmtClient.h>
extern REcmt iEcmt;
#endif
To print on diagnostics:
iEcmt.Write(_L("Debug"));[/QUOTE]
thankI tried. but when the emulator run to line iEcmt.Write(_L("Debug")), then I get emulator off without knowing the reason. It's just shutdown. when debug step by step, I get "No source available for "0x36C9636( ekern.exe )() " " error. I did include the ecmt lib in mmp file.
I don't know what is going on. any suggetion ? I run on window 7, sdk s60 3rd edition fp2.
Re: how to print to Systemout of Diagnostics in symbian c++
Ok, i forgot to mention the following statement(in the ConstructL() of AppUi):
#ifdef _DEBUG
iEcmt.Connect();
#endif
also a minor edit for writing to diagnostics:
#ifdef _DEBUG
iEcmt.Write(_L("Debug"));
#endif
Re: how to print to Systemout of Diagnostics in symbian c++
I followed the article to use RDebug. [url]http://www.developer.nokia.com/Community/Wiki/How_to_use_RDebug[/url]
but I can't find the Debug Message Console. how can I filter the output from emulator. just the info I want to print from RDebug::print
I works with Carbide 3.3.0 and there is no "view process output" and "Debug message" to check.
Re: how to print to Systemout of Diagnostics in symbian c++
any one please help. I tried some way but it didn't work. How to change or config some thing to see just debug info from RDebug::print.