×

Discussion Board

Results 1 to 14 of 14
  1. #1
    Registered User
    Join Date
    Jul 2012
    Posts
    25

    output to IDE console

    Does any one know how to direct output to standard IDE console ?
    I'm new to symbian c++ programming.
    I've use RDebug to out put to IDE console but it just works in debug mode.
    what I want is that when I run my app in emulator, the emulator direct my output to the IDE console just like j2me when I use system.out.printl() then the emulator prints to the IDE console.
    (because run in debug mode got a quite delay and it's annoying)
    thanks in advance.

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,694

    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.

  3. #3
    Registered User
    Join Date
    Jul 2012
    Posts
    25

    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.
    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

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,694

    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++. http://www.developer.nokia.com/Commu...eams_in_Open_C describes some kind of redirection of it.
    RDebug exists exactly because there is nothing else.

  5. #5
    Registered User
    Join Date
    Jul 2012
    Posts
    25

    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++

  6. #6
    Registered User
    Join Date
    Jul 2012
    Posts
    25

    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
    Last edited by harunaga; 2013-01-13 at 19:32.

  7. #7
    Registered User
    Join Date
    Jul 2012
    Posts
    25

    Cool 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?

  8. #8
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,694

    Re: output to IDE console

    Quote Originally Posted by harunaga View Post
    thanks a lot for replying me. so, is there any library or plug in for the sdk could help me.
    You can check the Open C console documentation, if it can be redirected to something else than a file.
    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 )
    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: http://www.developer.nokia.com/Commu...ons_on_Devices). 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.

  9. #9
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    4,033

    Re: how to print to Systemout of Diagnostics in symbian c++

    Quote Originally Posted by harunaga View Post
    any one could tell me how to print to the system out of Diagnostics tool of the sdk emulator?
    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"));

  10. #10
    Registered User
    Join Date
    Jul 2012
    Posts
    25

    Re: output to IDE console

    Quote Originally Posted by wizard_hu_ View Post
    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: http://www.developer.nokia.com/Commu...ons_on_Devices). 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.
    thanks. it helps me alot

  11. #11
    Registered User
    Join Date
    Jul 2012
    Posts
    25

    Re: how to print to Systemout of Diagnostics in symbian c++

    Quote Originally Posted by vineet.jain View Post
    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"));
    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.

  12. #12
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    4,033

    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

  13. #13
    Registered User
    Join Date
    Jul 2012
    Posts
    25

    Re: how to print to Systemout of Diagnostics in symbian c++

    I followed the article to use RDebug. http://www.developer.nokia.com/Commu..._to_use_RDebug
    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:rint
    I works with Carbide 3.3.0 and there is no "view process output" and "Debug message" to check.

  14. #14
    Registered User
    Join Date
    Jul 2012
    Posts
    25

    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:rint.

Similar Threads

  1. No output in "TRK Program Output" console
    By Cartouche67 in forum Symbian User Interface
    Replies: 4
    Last Post: 2009-06-18, 08:49
  2. how to understand console output
    By tlr in forum Symbian
    Replies: 4
    Last Post: 2009-03-26, 18:34
  3. Console Output????
    By deepchand86 in forum Symbian
    Replies: 2
    Last Post: 2008-08-05, 06:28
  4. How to output RDebug::Print to Console
    By Holler in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 5
    Last Post: 2008-04-01, 14:38
  5. Console Output Problem
    By sameer.chaudhari in forum Symbian
    Replies: 2
    Last Post: 2008-01-18, 12:59

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×