473,218 Members | 1,700 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,218 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 13820

"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?
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

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.