Debug problem in Visual c++ 6

Login to reply to this topic.
Mon, 2006-05-22 11:53
Joined: 2006-05-16
Forum posts: 4
I am a newbie in the symbian programming area. Now I am trying to debug a simple console program (exe) in the visual c++ 6. Here is the program :
/****************************************************/
#include <e32base.h>
#include <e32cons.h>

CConsoleBase* console;

void RunExampleL()
{
   console->Printf(_L("Example Code\n"));
   // Add example code here
}

void RunConsoleL()
{
   _LIT(KName,"Tests");
   _LIT(KAnyKey,"[Press any key]\n");
   
   console=Console::NewL(KName,TSize(KConsFullScreen,KConsFullScreen));
   CleanupStack::PushL(console);
   RunExampleL();
   
   for (TInt i = 0; i < 5; i++)
      console->Printf(_L("Example\n"));
   
   console->Printf(KAnyKey);
   console->Getch();
   CleanupStack::PopAndDestroy(console);
}
TInt E32Main()
{
   __UHEAP_MARK;
   CTrapCleanup* cleanupStack = CTrapCleanup::New();
   TRAPD(error,RunConsoleL());
   __ASSERT_ALWAYS(!error,User::Panic(_L("Example"),error));
   delete cleanupStack;
   __UHEAP_MARKEND;
   return(0);
}

/****************************************************/
Now I set break points in the  RunConsoleL() function. When I start to debug I can step over with F10. While I can see the output int the debug section of the vc++, I can not see the output in the emulator while debugging. I mean in the for loop the program writes a text to the output but I can not see it. If I press F5 " an access violation occured" message appears in the visual c++. Also I can not activate the emulator while debugging. When I look it in the windows task manager its status is "not responding".

I hope I can explain my problem with my bad english.  I am looking for help and thank you.

Mon, 2006-05-22 13:49
Joined: 2006-05-22
Forum posts: 37
Re: Debug problem in Visual c++ 6
Simple trick. Place your emulator window on the right of the screen and shrink your VC6 window so that you can see both windows on your screen. Now step through your programm and you can see the output directly.

Maybe you have to enable window server auto_flush to see the output directly(Press SHIFT+STRG+ALT+F in emulator).

have fun...

Rayko Enz
www.sic-software.com

Mon, 2006-05-22 14:50
Joined: 2006-05-16
Forum posts: 4
Re: Debug problem in Visual c++ 6
rayko_enz
Grin thank you very much for the simple trick now I can see the output while debugging.

SHIFT+STRG+ALT+F

I am sorry for which does the STRG stands for ? On my keyboard there is no key which has name STRG ?

Also I want to ask another thing when I try to debug the simple helloworld program that comes with the sdk the visual c++ says that the project does not contain debugging information. Although I compile it in the debug mode. Any idea?

Thank you very much
Mon, 2006-05-22 15:00
Joined: 2005-11-20
Forum posts: 1246
Re: Debug problem in Visual c++ 6
"STRG" is the name of the "Control" key on German keyboards...

René Brunner

Mon, 2006-05-22 15:20
Joined: 2006-05-16
Forum posts: 4
Re: Debug problem in Visual c++ 6
thank you very much for your kind help  Grin
Mon, 2006-05-22 17:29
Joined: 2006-05-22
Forum posts: 37
Re: Debug problem in Visual c++ 6
The message program doesn't contain debug information is normal because the EPOC.exe which you debug simply doesn't contain these.  Grin

So just ignore.

have fun...

Rayko Enz
www.sic-software.com

  • Login to reply to this topic.