Does anyone know how to clear the window so it's easier to see the
stuff you have listed with Debug.Write(xyz)?
Bob Sweeney 9 14346
On Mar 22, 12:21 pm, Peter Bromberg [C# MVP]
<pbromb...@yahoo.yabbadabbadoo.comwrote:
Try right-clicking inside the Output window and look at the context menu
options.
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"Bob" wrote:
Does anyone know how to clear the window so it's easier to see the
stuff you have listed with Debug.Write(xyz)?
Bob Sweeney- Hide quoted text -
- Show quoted text -
I mean programmatically so I can see my Debug.Write results
Programmatically, you need to work with the DTE80 assembly which comes in
either COM or .NET flavors. I don't know exactly how to do it, but there are
plenty of code samples on MSDN to get you started.
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"Bob" wrote:
On Mar 22, 12:21 pm, Peter Bromberg [C# MVP]
<pbromb...@yahoo.yabbadabbadoo.comwrote:
Try right-clicking inside the Output window and look at the context menu
options.
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"Bob" wrote:
Does anyone know how to clear the window so it's easier to see the
stuff you have listed with Debug.Write(xyz)?
Bob Sweeney- Hide quoted text -
- Show quoted text -
I mean programmatically so I can see my Debug.Write results
Does anyone know how to clear the window so it's easier to see the
stuff you have listed with Debug.Write(xyz)?
You can't programmatically. I know, it sucks. Best to make a logger
and use that instead. Although, sometimes the Output window info is
useful, so its not a complete waste. But, for general debugging it
pretty much is.
I wonder if you can just create a console, like in Win32 apps? And
use that? That'd be the easiest solution, I imagine. But, last I
heard you couldn't instantiate Console in .NET 2.0 or later.
Zytan
Zytan,
This is inaccurate. With the EnvDTE80 namespace you have programmatic access
to all of the IDE, its windows, and their contents: http://msdn2.microsoft.com/en-us/lib...68(VS.80).aspx http://msdn2.microsoft.com/en-us/lib...te(VS.80).aspx
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"Zytan" wrote:
Does anyone know how to clear the window so it's easier to see the
stuff you have listed with Debug.Write(xyz)?
You can't programmatically. I know, it sucks. Best to make a logger
and use that instead. Although, sometimes the Output window info is
useful, so its not a complete waste. But, for general debugging it
pretty much is.
I wonder if you can just create a console, like in Win32 apps? And
use that? That'd be the easiest solution, I imagine. But, last I
heard you couldn't instantiate Console in .NET 2.0 or later.
Zytan
Yup. This works. But is it worth of it?
private void ClearOutput()
{
EnvDTE80.DTE2 ide =
(EnvDTE80.DTE2)System.Runtime.InteropServices.Mars hal.GetActiveObject("VisualStudio.DTE.8.0");
ide.ExecuteCommand("Edit.ClearOutputWindow","");
System.Runtime.InteropServices.Marshal.ReleaseComO bject(ide);
}
"Peter Bromberg [C# MVP]" <pb*******@yahoo.yabbadabbadoo.comha scritto nel
messaggio news:E4**********************************@microsof t.com...
Zytan,
This is inaccurate. With the EnvDTE80 namespace you have programmatic
access
to all of the IDE, its windows, and their contents:
http://msdn2.microsoft.com/en-us/lib...68(VS.80).aspx http://msdn2.microsoft.com/en-us/lib...te(VS.80).aspx
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"Zytan" wrote:
Does anyone know how to clear the window so it's easier to see the
stuff you have listed with Debug.Write(xyz)?
You can't programmatically. I know, it sucks. Best to make a logger and use that instead. Although, sometimes the Output window info is useful, so its not a complete waste. But, for general debugging it pretty much is.
I wonder if you can just create a console, like in Win32 apps? And use that? That'd be the easiest solution, I imagine. But, last I heard you couldn't instantiate Console in .NET 2.0 or later.
Zytan
This is inaccurate. With the EnvDTE80 namespace you have programmatic access
to all of the IDE, its windows, and their contents:
http://msdn2.microsoft.com/en-us/lib...te(VS.80).aspx
I thought you could, but not from C#, which is what I meant. But, I
see that you can from C#, as Laura has shown with the content you
provided.
Zytan
Yup. This works. But is it worth of it?
>
private void ClearOutput()
{
EnvDTE80.DTE2 ide =
(EnvDTE80.DTE2)System.Runtime.InteropServices.Mars hal.GetActiveObject("Visu*alStudio.DTE.8.0");
ide.ExecuteCommand("Edit.ClearOutputWindow","");
System.Runtime.InteropServices.Marshal.ReleaseComO bject(ide);
}
Thanks for the example, Laura.
What do you imply by your question? I have one question, and maybe
this is what you are getting at: Is there any reason why the Output
Windows is NOT cleared? I'd prefer it cleared every time. Oh, wait,
I think I know why: because you'll clear the start-up logging of the
process. We actually want it to be cleared BEFORE that, so that only
the current run is shown in the window. Yeah, so this is why it is
likely not worth it. And thus, a logger is a better idea.
Zytan
We actually want it to be cleared BEFORE that, so that only
the current run is shown in the window.
Actually, only the current execution is shown in the Output Window.
So all is ok.
I was certain that before this wasn't the case. I think I was
thinking about how it works in VB, which is quite different.
Zytan This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mike Turco |
last post by:
Is there a way to clear the debug window other than just sending a bunch of
line feeds? Tanks -- Mike
|
by: MLH |
last post by:
I have this little snippet running whenever I want to list my table
field names in the debug window, along with their field types...
For i = 0 To TempRecordset.Fields.Count - 1
Debug.Print...
|
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...
|
by: Adrian Constantinescu |
last post by:
Hi,
When a project VB.Net start, the output window if filled with this
kind on informations:
'TextBox.exe': Loaded...
|
by: Johann Schuler |
last post by:
Let's say I have a Person class with a private int age member variable. I
have a get and set accessor for the Age property. When I am running the code
in debug mode, I would like to have a debug...
| |
by: Zytan |
last post by:
The Immediate Window is filled with debugging output from previous
runs. Besides manually right clicking and clearing it, is there a
programmatic way of doing this?
Should I create and use a...
|
by: Bob |
last post by:
Does anyone know how to clear the window so it's easier to see the
stuff you have listed with Debug.Write(xyz)?
I need to know how to do this in code...I know how to manually do it
with the...
|
by: JPS |
last post by:
I am having trouble with this code. It is something syntactically,
but I am not sure what. The first line will not compile.
My ends result should clear the debug window.
OutputWindow outputWin...
|
by: GaryTexmo |
last post by:
Nothing amazing here, this is just a base groundwork for a debug window that someone could use to output debug text in a windows application. It provides fairly basic functionality so feel free to...
|
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,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |
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...
|
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,...
|
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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |