carriage returns in command window

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lewis Edward Moten III

    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

  • Joseph Kormann

    #2
    Re: carriage returns in command window


    "Lewis Edward Moten III" <lewis@moten.co m> wrote in message
    news:d78559d6.0 309110723.1d262 f23@posting.goo gle.com...[color=blue]
    > 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[/color]

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



    Comment

    • Jeffrey Tan[MSFT]

      #3
      RE: carriage returns in command window


      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: lewis@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: <d78559d6.03091 10723.1d262f23@ 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: groups-abuse@google.co m
      | 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
      |

      Comment

      • Tom Couvret

        #4
        Re: carriage returns in command window

        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

        Comment

        • Tom Couvret

          #5
          Re: carriage returns in command window

          Tom Couvret wrote:[color=blue]
          > 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[/color]
          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

          Comment

          • Lewis Edward Moten III

            #6
            Re: carriage returns in command window

            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 <tomcouvret@spa mcop.net> wrote in message news:<uo0f$5ejD HA.688@TK2MSFTN GP10.phx.gbl>.. .[color=blue]
            > Tom Couvret wrote:[color=green]
            > > 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[/color]
            > 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[/color]

            Comment

            • Jeffrey Tan[MSFT]

              #7
              Re: carriage returns in command window


              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 mswish@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: lewis@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: <d78559d6.03110 40719.7e3333fb@ posting.google. com>
              | References: <d78559d6.03091 10723.1d262f23@ posting.google. com>
              <2a34ab6c.03100 72117.33664135@ posting.google. com>
              <uo0f$5ejDHA.68 8@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: groups-abuse@google.co m
              | 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 <tomcouvret@spa mcop.net> wrote in message
              news:<uo0f$5ejD HA.688@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
              |

              Comment

              Working...