473,765 Members | 2,203 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Debug console window?

Hi

I would like to view certain variables during run time and find the
Console.WriteLi ne which write to the visual studio command window not very
useful, either i cant see what is displayed until after my app finishes or i
cant see it a all.

I therefore want to make a command window (you know the black one that comes
up which a console app creates) and just output my debug info onto that. so
as my app runs i have a nice side window where i can watch all my vars
values.

Is there a simple way to do this? Can you mix normal win apps with console
apps? Is there a better way to viewing vars at runtime?

Thanks
May 10 '06 #1
3 2401
Daniel,

I don't think that this is a good idea. Why not just use the Debug
class in the System.Diagnost ics namespace? This will allow you to give
output to the trace window.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Daniel" <Da*****@vestry online.com> wrote in message
news:O2******** ******@TK2MSFTN GP05.phx.gbl...
Hi

I would like to view certain variables during run time and find the
Console.WriteLi ne which write to the visual studio command window not very
useful, either i cant see what is displayed until after my app finishes or
i cant see it a all.

I therefore want to make a command window (you know the black one that
comes up which a console app creates) and just output my debug info onto
that. so as my app runs i have a nice side window where i can watch all my
vars values.

Is there a simple way to do this? Can you mix normal win apps with console
apps? Is there a better way to viewing vars at runtime?

Thanks

May 10 '06 #2
Hello Daniel,

Why to be harnessed into some kind of windows - use logs for this
I bet on logs because in many cases you have no access to the components
or UI at all.
Writing to log and for example mailing this log by email gives u flexebile
control over your app.

I recomend to look at "log4net" or "Microsoft Application Logging" libraries
for that
We are using them wide over years for reasons u have described

D> I would like to view certain variables during run time and find the
D> Console.WriteLi ne which write to the visual studio command window not
D> very useful, either i cant see what is displayed until after my app
D> finishes or i cant see it a all.
D>
D> I therefore want to make a command window (you know the black one
D> that comes up which a console app creates) and just output my debug
D> info onto that. so as my app runs i have a nice side window where i
D> can watch all my vars values.
D>
D> Is there a simple way to do this? Can you mix normal win apps with
D> console apps? Is there a better way to viewing vars at runtime?

---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
May 10 '06 #3
Thanks for all your help guys thats great!

D

"Daniel" <Da*****@vestry online.com> wrote in message
news:O2******** ******@TK2MSFTN GP05.phx.gbl...
Hi

I would like to view certain variables during run time and find the
Console.WriteLi ne which write to the visual studio command window not very
useful, either i cant see what is displayed until after my app finishes or
i cant see it a all.

I therefore want to make a command window (you know the black one that
comes up which a console app creates) and just output my debug info onto
that. so as my app runs i have a nice side window where i can watch all my
vars values.

Is there a simple way to do this? Can you mix normal win apps with console
apps? Is there a better way to viewing vars at runtime?

Thanks

May 10 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2082
by: Robert | last post by:
Simple way of writing debug print statements in your JavaScript code. You need to have enabled popups in your browser. I liked the ability to write to the java console in Netscape 4.x. This, ability is missing in IE and the latest versions of Netscape. Maybe someone knows a better way and can improve on this code, the following JavaScript code demonstrates how to write debug statements in a JavaScript program. I sure lots of people...
4
8741
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. The obvious way to do this is by using the static Console type properties, In and Out. When trying to debug the app in the IDE however, this doesn't appear to work. I've edited the project properties and added the necessary text to the "command...
5
3034
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) and it seems there isn't an Output window (where the Debug.WriteLine() info would go) like VS has. If there is, I can't find it. I would like to know if it is possible to write a class with the ability to call a console window that would display...
2
2329
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 debug/output pane? At the moment my application creates a "command" window and writes output there (all by itself) - and said window closes itself when the application terminates. (So I guess somewhere in Visual Studio configuration there is an output...
7
18797
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 2003 The sample in the help file does not work. I tried now for days ... Pls could anybody post a sample, including necessary imports and so on -
12
2590
by: Micah | last post by:
I am looking for a way to tell if the program is compiled in debug mode, I want the application I am writing to spit out a message to QA if a error occured and if it is in debug mode, but if it is in release mode, I want it to keep the error to itself. is there a way to do this if so how ? Micah
46
24270
by: Ian Boyd | last post by:
IIS5, on a Windows 2000 Server machine. Debeg.WriteLine "Hello, world!" How can i view it?
3
13860
by: TC | last post by:
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...
2
9038
by: joelkeepup | last post by:
Hi, I made a change this morning and now im getting an error that says either "a is undefined or null" or "e is undefined or null" the microsoft ajax line is below, I have no idea how to figure this problem out. Any suggestions? thanks Joel
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10156
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9832
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8831
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7375
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
3924
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3531
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2805
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.