469,271 Members | 1,743 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

How Do I Debug the Console Output?

TC
I'm trying to debug a console application, but I can't see the console
output. I've seen many references which say that console output is
supposed to appear on the Output window when the application is run in
Debug mode. However, I just can't get that to work.

I'm using Visual Studio 2005. I've confirmed that my application is
compiled as a console application, and that I'm running in Debug mode.
To investigate this issue, I've reduced the entire application to 5
lines:

Module Module1
Sub Main()
Console.Write("Test")
End Sub
End Module

Why don't I see "Test" on the Output window, and what must I do to see
it somewhere?
-TC

Jul 7 '07 #1
3 13596

"TC" <go*********@yahoo.comwrote in message
news:11**********************@e9g2000prf.googlegro ups.com...
I'm trying to debug a console application, but I can't see the console
output. I've seen many references which say that console output is
supposed to appear on the Output window when the application is run in
Debug mode. However, I just can't get that to work.

I'm using Visual Studio 2005. I've confirmed that my application is
compiled as a console application, and that I'm running in Debug mode.
To investigate this issue, I've reduced the entire application to 5
lines:

Module Module1
Sub Main()
Console.Write("Test")
End Sub
End Module

Why don't I see "Test" on the Output window, and what must I do to see
it somewhere?
-TC
Do you mean the console window? Console output will not be displayed in the
VS 2005 Output Window.
You need to add some code that will keep the console window open after your
write. As it is now, the application ends and the console window closes
before you see the output.
You could add a Console.Read() after the Write to pause your program to wait
for input to keep the console window open so you could see it.

Jul 7 '07 #2

The only time I have seen a Console Application start directing output to
the IDE Output window was when the application was using threading. It was a
PITA as I never did figure out why it would start using the Output window
while I was debugging. I had to reboot the machine to make it go back to the
IDE and the DOS windows where I wanted to debug from.

The link may help

http://www.google.com/search?hl=en&q...ET&btnG=Search
"TC" <go*********@yahoo.comwrote in message
news:11**********************@e9g2000prf.googlegro ups.com...
I'm trying to debug a console application, but I can't see the console
output. I've seen many references which say that console output is
supposed to appear on the Output window when the application is run in
Debug mode. However, I just can't get that to work.

I'm using Visual Studio 2005. I've confirmed that my application is
compiled as a console application, and that I'm running in Debug mode.
To investigate this issue, I've reduced the entire application to 5
lines:

Module Module1
Sub Main()
Console.Write("Test")
End Sub
End Module

Why don't I see "Test" on the Output window, and what must I do to see
it somewhere?
-TC
Jul 7 '07 #3
TC
On Jul 7, 2:05 pm, "Mr. Arnold" <MR. Arn...@Arnold.comwrote:
The only time I have seen a Console Application start directing output to
the IDE Output window was when the application was using threading. It was a
PITA as I never did figure out why it would start using the Output window
while I was debugging. I had to reboot the machine to make it go back to the
IDE and the DOS windows where I wanted to debug from.

The link may help

http://www.google.com/search?hl=en&q...pplication+out...

"TC" <golemdan...@yahoo.comwrote in message

news:11**********************@e9g2000prf.googlegro ups.com...
I'm trying to debug a console application, but I can't see the console
output. I've seen many references which say that console output is
supposed to appear on the Output window when the application is run in
Debug mode. However, I just can't get that to work.
I'm using Visual Studio 2005. I've confirmed that my application is
compiled as a console application, and that I'm running in Debug mode.
To investigate this issue, I've reduced the entire application to 5
lines:
Module Module1
Sub Main()
Console.Write("Test")
End Sub
End Module
Why don't I see "Test" on the Output window, and what must I do to see
it somewhere?
-TC- Hide quoted text -

- Show quoted text -
Thanks for the replies. Apparently, I was misinformed. I was told that
in Debug mode, Visual Studio somehow echoes the console output in a
Visual Studio window. Since that isn't the case, I will rely on other
debugging techniques.

-TC

Jul 7 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Nick Forrington | last post: by
3 posts views Thread by Brett | last post: by
2 posts views Thread by Peter Kirk | last post: by
3 posts views Thread by Frank Rizzo | last post: by
7 posts views Thread by Thomas Pecha | last post: by
3 posts views Thread by Daniel | last post: by
46 posts views Thread by Ian Boyd | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.