carriage returns in command window

  • Thread starter Thread starter Lewis Edward Moten III
  • Start date Start date
L

Lewis Edward Moten III

I'm having some problems when debugging datasets in C#. During
run-time, I arrive at a break point in my code and goto the command
window. I type MyDataset.GetXML()

The results are a lot of text with \r\n in it and is very hard to
read. I have to keep scrolling left and right as the text does not
wrap either. When doing the same thing in VB, it writes out actually
carriage returns so that each item appears on a new line. Is there a
way in C# so that it will write out the actual contents of the string
rather then the escaped contents?

? MyDataset.GetXml()
"<MyDataSet>\r\n <MyTable>\r\n
<ID>ec209f17-baf9-43e4-8803-d444f6c11bd0</ID>\r\n ...

Lewis Moten
http://www.lewismoten.com
 
Lewis Edward Moten III said:
I'm having some problems when debugging datasets in C#. During
run-time, I arrive at a break point in my code and goto the command
window. I type MyDataset.GetXML()

The results are a lot of text with \r\n in it and is very hard to
read. I have to keep scrolling left and right as the text does not
wrap either. When doing the same thing in VB, it writes out actually
carriage returns so that each item appears on a new line. Is there a
way in C# so that it will write out the actual contents of the string
rather then the escaped contents?

? MyDataset.GetXml()
"<MyDataSet>\r\n <MyTable>\r\n
<ID>ec209f17-baf9-43e4-8803-d444f6c11bd0</ID>\r\n ...

Lewis Moten
http://www.lewismoten.com

Try replacing those characters with a non-intrusive character.
myString = myString.Replace('\r', ' ');
myString = myString.Replace('\n', ' ');
 
Hi Lewis,

I think this is by design.
If you want to watch the content of the XML file, you can use
dataset.GetXML()
to display its content in a TextBox, the TextBox will gratefully parse the
"\r\n"
as a newline

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: (e-mail address removed) (Lewis Edward Moten III)
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Subject: carriage returns in command window
| Date: 11 Sep 2003 08:23:58 -0700
| Organization: http://groups.google.com/
| Lines: 17
| Message-ID: <[email protected]>
| NNTP-Posting-Host: 20.4.210.149
| Content-Type: text/plain; charset=ISO-8859-1
| Content-Transfer-Encoding: 8bit
| X-Trace: posting.google.com 1063293838 27062 127.0.0.1 (11 Sep 2003
15:23:59 GMT)
| X-Complaints-To: (e-mail address removed)
| NNTP-Posting-Date: 11 Sep 2003 15:23:59 GMT
| Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onlin
e.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-01!sn-
xit-09!supernews.com!postnews1.google.com!not-for-mail
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:184122
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| I'm having some problems when debugging datasets in C#. During
| run-time, I arrive at a break point in my code and goto the command
| window. I type MyDataset.GetXML()
|
| The results are a lot of text with \r\n in it and is very hard to
| read. I have to keep scrolling left and right as the text does not
| wrap either. When doing the same thing in VB, it writes out actually
| carriage returns so that each item appears on a new line. Is there a
| way in C# so that it will write out the actual contents of the string
| rather then the escaped contents?
|
| ? MyDataset.GetXml()
| "<MyDataSet>\r\n <MyTable>\r\n
| <ID>ec209f17-baf9-43e4-8803-d444f6c11bd0</ID>\r\n ...
|
| Lewis Moten
| http://www.lewismoten.com
|
 
I agree with this... its very annoying. And what is worse is that I
just checked at VS2002 and it used to format nicely, but as of VS2003
it no longer does.

Parhaps your call of "works in VB" may be that the VB app you did was
the old version?

Anyone else care to comment? Its an obvious candidate for a
configurable option, as the way it is now has removed a very useful
debugging tool.

Tom
 
Tom said:
I agree with this... its very annoying. And what is worse is that I
just checked at VS2002 and it used to format nicely, but as of VS2003
it no longer does.

Parhaps your call of "works in VB" may be that the VB app you did was
the old version?

Anyone else care to comment? Its an obvious candidate for a
configurable option, as the way it is now has removed a very useful
debugging tool.

Tom
Sorry... the original post may no longer be around - I found it on Google.

Complaint was that when you type myDataSet.GetXml() in the command
window, it formats with each element in the XML being terminated with
\r\n. This forces it way out to the right, and the parts you want to see
for debugging are either too far off the right, or lost completely, or
certainly are not easily read.

Using GetXml used to be a great help in debugging as the output was very
easy to read.

Tom
 
I thought it used to work the rite way. Thanks for confirming this.
Someone suggested I should use a text box to display the results.
That is pretty hard when you are debugging DLL's. It also takes a lot
more time to do more steps then just reading it out. Same goes for
the guy who wanted me to replace the characters whith white space.
unless you do something like:

? dsResults.GetXml().Replace('\n', ' ').Replace('\r', ' ')

I do not see why this has changed in VS 2003. the "works in VB" is in
the same environment. I've got a mix of C# and VB.Net projects in the
same solution I've been testing with.

Yea, I could use the text box, or write it out somewhere else, but
then why would I ever need to use the debug window? This hurts
developers a lot. I'm hearing that in ASP.Net 2.0 they are really
focusing on developers productivity. Putting this back in would be
great in reducing my time to debug.
 
Hi Lewis,

Thanks for your feedback.
I think you can forward your suggestion to:
http://register.microsoft.com/mswish/suggestion.asp,
or you can email to (e-mail address removed)

your suggestion will make our product more efficient.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: (e-mail address removed) (Lewis Edward Moten III)
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Subject: Re: carriage returns in command window
| Date: 4 Nov 2003 07:19:23 -0800
| Organization: http://groups.google.com
| Lines: 47
| Message-ID: <[email protected]>
| References: <[email protected]>
<[email protected]>
<[email protected]>
| NNTP-Posting-Host: 20.4.210.149
| Content-Type: text/plain; charset=ISO-8859-1
| Content-Transfer-Encoding: 8bit
| X-Trace: posting.google.com 1067959164 19625 127.0.0.1 (4 Nov 2003
15:19:24 GMT)
| X-Complaints-To: (e-mail address removed)
| NNTP-Posting-Date: Tue, 4 Nov 2003 15:19:24 +0000 (UTC)
| Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onlin
e.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!postnews1.google.com!no
t-for-mail
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:196609
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| I thought it used to work the rite way. Thanks for confirming this.
| Someone suggested I should use a text box to display the results.
| That is pretty hard when you are debugging DLL's. It also takes a lot
| more time to do more steps then just reading it out. Same goes for
| the guy who wanted me to replace the characters whith white space.
| unless you do something like:
|
| ? dsResults.GetXml().Replace('\n', ' ').Replace('\r', ' ')
|
| I do not see why this has changed in VS 2003. the "works in VB" is in
| the same environment. I've got a mix of C# and VB.Net projects in the
| same solution I've been testing with.
|
| Yea, I could use the text box, or write it out somewhere else, but
| then why would I ever need to use the debug window? This hurts
| developers a lot. I'm hearing that in ASP.Net 2.0 they are really
| focusing on developers productivity. Putting this back in would be
| great in reducing my time to debug.
|
|
|
| > Tom Couvret wrote:
| > > I agree with this... its very annoying. And what is worse is that I
| > > just checked at VS2002 and it used to format nicely, but as of VS2003
| > > it no longer does.
| > >
| > > Parhaps your call of "works in VB" may be that the VB app you did was
| > > the old version?
| > >
| > > Anyone else care to comment? Its an obvious candidate for a
| > > configurable option, as the way it is now has removed a very useful
| > > debugging tool.
| > >
| > > Tom
| > Sorry... the original post may no longer be around - I found it on
Google.
| >
| > Complaint was that when you type myDataSet.GetXml() in the command
| > window, it formats with each element in the XML being terminated with
| > \r\n. This forces it way out to the right, and the parts you want to
see
| > for debugging are either too far off the right, or lost completely, or
| > certainly are not easily read.
| >
| > Using GetXml used to be a great help in debugging as the output was
very
| > easy to read.
| >
| > Tom
|
 
Back
Top