473,327 Members | 1,979 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,327 software developers and data experts.

pusing debug info to a log file

Is there an easy way to make a copy of all the debug.writeline stuff go to a
log file also? thanks!
Nov 20 '05 #1
1 1153
Hi,
Use trace instead of debug. Add a textwriterlistener to the
trace listeners.

Dim fs As New System.IO.FileStream("C:\Test.txt", IO.FileMode.Append)

Dim myTextListener As New TextWriterTraceListener(fs)

Trace.Listeners.Add(myTextListener)

Dim environmentVariables As IDictionary =
Environment.GetEnvironmentVariables()

Dim de As DictionaryEntry

For Each de In environmentVariables

Trace.WriteLine(String.Format(" {0} = {1}", de.Key, de.Value))

Next de

Ken
----------------------
"Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
news:ul**************@TK2MSFTNGP12.phx.gbl...
Is there an easy way to make a copy of all the debug.writeline stuff go to a log file also? thanks!

Nov 20 '05 #2

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

Similar topics

0
by: ringos75 | last post by:
hi, i've done an application that it have to link dynamically some my dll (plugin). In debug mode (Shared MFC DLL) i haven't any problem. If i try to compile the project in debug mode and link...
8
by: Davy | last post by:
Hi all, I use VC and gcc/gdb to compile and debug C/C++ files. But I found some of the debug version of the compiled files are too large to be run in a small RAM. Can I compile C/C++ Debug...
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)...
2
by: Visual Systems AB \(Martin Arvidsson\) | last post by:
Hi! I have created an application that doesn't quite work on my co-workers computer. I want to install the app with debug information, in my crazy mind i thought that when an exception was...
5
by: TPS | last post by:
When I set trace enable to true in my web.config file, the debug info does not display at the "bottom" of the page, it displays "under" all of my buttons, labels, grids etc. This behavior...
1
by: Brian | last post by:
Can sombody please outline the diference between setting complication mode from the toolbar in VS.Net (i.e. debug/release) and setting the debug attribute (i.e. true/false) on the compilation...
3
by: Bardo | last post by:
Hi all, We are trying to debug an assembly which was built in debug configuration on our build server. The output window of visual studio indicates that no symbols are being loaded for the...
6
by: Andrew Rowley | last post by:
I am having trouble getting debug and release builds to work properly with project references using C++ .NET and Visual Studio 2003. I created a test solution, with a basic Windows form C++...
3
by: guybenron | last post by:
Hey, I have a sort of petty-neurotic question, I'm kinda pedantic and like to keep my log directories clean, and this thing is bothering me to the point of actually posting a question (couldn't...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.