Re: How to get debugging output in .Net



Hi Lau Lei ,

Thank you for your help. As you may notice, I got a response from Michael:

Use Debug.WriteLine() from System.Diagnostics

I think his syntax means less typing for me, so I think I'm going to adopt
his idea.

Best wishes,
Richard

"Lau Lei Cheong" <leu_lc@xxxxxxxxxxxx> wrote in message
news:e%23ioyKRrFHA.460@xxxxxxxxxxxxxxxxxxxxxxx
> I'm not writting C++ projects, but I prefer to use
> System.Console.Error.Write()/WriteLine() to output console debug messages.
> (And I suspect this will also work for winform, where in debug mode it'll
> write into "Output" window)
>
> "Richard Lionheart" <NoOne@xxxxxxxxxxx>
> ¼¶¼g©ó¶l¥ó·s»D:OZliTgPrFHA.2880@xxxxxxxxxxxxxxxxxxxxxxx
>> Hi All,
>>
>> I'm creating a web-forms app using Prosise's "Programming MS .Net"
>> (2002). He had a try block (on p. 208) followed by:
>>
>> catch (FormatException e)
>> {
>> Output.Text("Error");
>> }
>>
>> The only namespace he imported was System.Data.
>>
>> I tried the same thing, but the compiler didn't like "Output." Could
>> that be because I'm running .Net 1.1, where his book was no doubt based
>> on 1.0?
>>
>> Then I tried System.Diagnostics.Trace.WriteLine ("Starting Page_Load");
>> but couldn't find that text anywhere, not on the Client window nor in
>> the Output | Debug pane.
>>
>> I haven't written MSVC++ in years, but I miss my Debug.Output (or
>> whatever I did back then).
>>
>> Any ideas,
>>
>> TIA,
>> Ricard
>>
>
>


.



Relevant Pages

  • Re: how does this delete work?
    ... Recently I came across this delete statement inside a package that I ... have to debug: ... I must say the syntax is a little uncommon for me. ... Stephan, the syntax allows DML, a delete in this case, to be performed ...
    (comp.databases.oracle.server)
  • Re: Update table from form combo
    ... compile it first to look for syntax ... Thanks for reminding me about Debug. ...
    (microsoft.public.access.formscoding)
  • Re: Connection syntax not right
    ... you don't have an opening quote before otr.mdb" (s/b ... debug or messagebox.show to get the actual string ... > this but it does not like this syntax for some reason. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Haskell - Transforming a String in a function
    ... errors that are constantly being caught by the compiler, ... weren't for strong typing, you'd either never debug your code, or ... I hear eating fish is good for your brain. ...
    (comp.lang.functional)
  • Re: How to "or" a generic array of std_logic_vector ?
    ... to use a generate statement...basically the same amount of typing and debug ... The problem (latches) with this solution as well as that in the OP is ... that there is no assignment to data_out when the row is 0. ...
    (comp.lang.vhdl)