473,569 Members | 2,844 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

carriage returns in command window

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.GetXM L()

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.GetXm l()
"<MyDataSet>\r\ n <MyTable>\r\n
<ID>ec209f17-baf9-43e4-8803-d444f6c11bd0</ID>\r\n ...

Lewis Moten
http://www.lewismoten.com
Nov 15 '05 #1
6 2285

"Lewis Edward Moten III" <le***@moten.co m> wrote in message
news:d7******** *************** ***@posting.goo gle.com...
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.GetXM L()

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.GetXm l()
"<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.Replac e('\r', ' ');
myString = myString.Replac e('\n', ' ');

Nov 15 '05 #2

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: le***@moten.com (Lewis Edward Moten III)
| Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| Subject: carriage returns in command window
| Date: 11 Sep 2003 08:23:58 -0700
| Organization: http://groups.google.com/
| Lines: 17
| Message-ID: <d7************ **************@ posting.google. com>
| 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: gr**********@go ogle.com
| NNTP-Posting-Date: 11 Sep 2003 15:23:59 GMT
| Path:
cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!new sfeed00.sul.t-online.de!t-onlin
e.de!news-spur1.maxwell.s yr.edu!news.max well.syr.edu!sn-xit-03!sn-xit-01!sn-
xit-09!supernews.co m!postnews1.goo gle.com!not-for-mail
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1841 22
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.GetXM L()
|
| 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.GetXm l()
| "<MyDataSet>\r\ n <MyTable>\r\n
| <ID>ec209f17-baf9-43e4-8803-d444f6c11bd0</ID>\r\n ...
|
| Lewis Moten
| http://www.lewismoten.com
|

Nov 15 '05 #3
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
Nov 15 '05 #4
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.GetXm l() 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

Nov 15 '05 #5
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.GetXm l().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 <to********@spa mcop.net> wrote in message news:<uo******* ******@TK2MSFTN GP10.phx.gbl>.. .
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.GetXm l() 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

Nov 15 '05 #6

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 ms****@microsof t.com

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: le***@moten.com (Lewis Edward Moten III)
| Newsgroups: microsoft.publi c.dotnet.langua ges.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: <d7************ **************@ posting.google. com>
| References: <d7************ **************@ posting.google. com>
<2a************ **************@ posting.google. com>
<uo************ *@TK2MSFTNGP10. phx.gbl>
| 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: gr**********@go ogle.com
| NNTP-Posting-Date: Tue, 4 Nov 2003 15:19:24 +0000 (UTC)
| Path:
cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!new sfeed00.sul.t-online.de!t-onlin
e.de!news-spur1.maxwell.s yr.edu!news.max well.syr.edu!po stnews1.google. com!no
t-for-mail
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1966 09
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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.GetXm l().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 <to********@spa mcop.net> wrote in message
news:<uo******* ******@TK2MSFTN GP10.phx.gbl>.. .
| > 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.GetXm l() 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
|

Nov 15 '05 #7

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

Similar topics

3
9269
by: Canes_Rock | last post by:
The information posted at: http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=slrnarv28n.e4j.TuxTrax%40fortress.tuxnet&rnum=1&prev=/groups%3Fq%3Dsuppress%2Bcarriage%2Breturn%2Bgroup:comp.lang.python.*%26hl%3Den%26lr%3D%26ie%3DUTF-8%26group%3Dcomp.lang.python.*%26selm%3Dslrnarv28n.e4j.TuxTrax%2540fortress.tuxnet%26rnum%3D1 seemed to...
4
7311
by: Les Juby | last post by:
Can someone please help with a suggestion as to how I can keep the formatting (carriage returns) that the user enters into a memo field and then display that later. I figured I might be able to use: 'replace carriage returns with BRs comment=Replace(comment, chr(13), "<br>") but obviously net.! The <pre> tag doesn't sem to help either...
2
4118
by: Andrew Chanter | last post by:
I have a VBA function that returns a string including "vbcr" (VB Carriage Return) to seperate a list into multiple rows, eg Item1 & vbcr & Item2 & vbcr & Item3 This works as planned in the immediate window, producing a list where a Carriage Return follows each item. But when I output the result into either an Access query or form, instead...
2
2937
by: eagleofjade | last post by:
I am trying to import data from a Word document into an Access table with VBA. The Word document is a form which has various fields. One of the fields is a field for notes. In some cases, this note field contains carriage returns. When I import a note field that has carriage returns, what shows up in the Access field are vertical black...
2
2324
by: Matt Mercer | last post by:
Hi all, I am having a frustration problem, and I have read about 25 newsgroup postings that do not have a satisfying answer :) The problem appears to be common where carriage returns are lost when pulling data from an SQL database. The thing that frustrates me the most, is that when I use Enterprise Manager, the carriage returns ARE...
8
2212
by: TheDude5B | last post by:
Hi, I have some data which is stored in my MySQL database as TEXT. when the data is entered in, it has some carriage returns in it, and this can be seen when querying the data using MySQL Query Browser. I want to then display this text within <p> tags when requested from the database. However, the test is formatted without the carriage...
2
3240
by: Lila Godel | last post by:
I am having a problem with the download of web pages via the WebClient.DownloadFile function in the specialized VB.Net 2003 I.E. plug-in I am designing to speed up the work on my latest project. When I edit the web pages in notepad I see a square wherever I normally see a carriage return and a line feed when viewing the source in I.E. How...
7
11170
by: mattrapoport | last post by:
I have a page with a div on it. The div displays a user comment. When the user logs into this page, their current comment is pulled from a db and displayed in the div. The user can edit the comment through a pop-up that contains a textarea. When the user hits OK on the pop-up, the text in the textarea is sent to a function on the main...
0
1400
by: markus.shure | last post by:
Hi, I'm noticed a problem testing a JAX-WS client with a WSE server. The JAX-WS client adds carriage returns to a SOAP header element that is signed. This causes the WSE server to raise an error: "The signature or decryption failed". If the carriage returns are removed, the same web service call is successful. I tried replicating the...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7922
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. ...
0
8119
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...
0
7964
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...
0
6281
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...
1
5509
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...
0
5218
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2111
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

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.