473,386 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 13835

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Nick Forrington | last post by:
Hi, I'm making a program and have a static Console class that I'm using to output things, these get sent to the console and also to the graphics on screen (I'm using SDL). One thing I'm having a...
4
by: Bill Cohagan | last post by:
I'm writing a console app (in C#) and I want to be able to redirect the standard input/output streams when it's run at a command prompt. IOW I want to support the "<" and ">" redirection syntax....
5
by: chris | last post by:
Hello all - Preface: This isn't a C# Builder question but if you happen to have the answer to my primary problem, please feel free to chime in ;-) I'm using Borland's C# Builder (Personal)...
3
by: Brett | last post by:
I use the following to output to the console during debugging: catch(Exception ex) { Debug.WriteLine("Error: " + ex.Message); } Many of the times on the console, the above is appended on the...
2
by: Peter Kirk | last post by:
Hi I am "playing" with some simple aspects of C# with Visual Studio. All I would like to know right now is how do I get the Console.Write method to write its output in the Visual Studio...
3
by: Frank Rizzo | last post by:
Is there anyway to transparently redirect the output of the Debug.WriteLine statement from the Debug window to something else such as a console or a file? Thanks
7
by: Thomas Pecha | last post by:
Sorry for all who think this is easy, I was not able to handle this Coming from VB6 where with simple debug.print strAString you could write to debug window, I am totalling failing in vb.net...
3
by: Daniel | last post by:
Hi I would like to view certain variables during run time and find the Console.WriteLine which write to the visual studio command window not very useful, either i cant see what is displayed...
46
by: Ian Boyd | last post by:
IIS5, on a Windows 2000 Server machine. Debeg.WriteLine "Hello, world!" How can i view it?
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.