Home All Groups Group Topic Archive Search About

Debug.Wrile does not appear on the Output Window

Author
22 Apr 2006 7:59 AM
Bernard_Bourée
In order to trace my job I placed some
Debug.Writeline in my code but they don't appear in the output window!
How to solve it?

Thanks
Bernard

Author
22 Apr 2006 8:52 AM
Cor Ligthert [MVP]
Bernard,

Can you show the code?

On MSDN is written how to use it, we cannot change that.
Now you have only told, that it does not appear. By most of us it appears so
you should have done something special.

Cor

Show quoteHide quote
"Bernard Bourée" <bern***@bouree.net> schreef in bericht
news:e1GevKeZGHA.4884@TK2MSFTNGP02.phx.gbl...
> In order to trace my job I placed some
> Debug.Writeline in my code but they don't appear in the output window!
> How to solve it?
>
> Thanks
> Bernard
>
Author
22 Apr 2006 9:38 AM
Bernard_Bourée
Cor Ligthert [MVP] a écrit :
Show quoteHide quote
> Bernard,
>
> Can you show the code?
>
> On MSDN is written how to use it, we cannot change that.
> Now you have only told, that it does not appear. By most of us it appears so
> you should have done something special.
>
> Cor
>
> "Bernard Bourée" <bern***@bouree.net> schreef in bericht
> news:e1GevKeZGHA.4884@TK2MSFTNGP02.phx.gbl...
>> In order to trace my job I placed some
>> Debug.Writeline in my code but they don't appear in the output window!
>> How to solve it?
>>
>> Thanks
>> Bernard
>>
>
>
>
Cor

Of course I can show the code.
I have a small routine in order to trace my code.
Here it is.
It was working fine before but now not.
I have looked at the options but could not find a related item.

Thanks for your help
Bernard

Public Sub PrintLog(ByVal sMsg As String, Optional ByVal sTitre As
String = vbNullString)

         Dim fs As New Scripting.FileSystemObject
         Dim Stream As Scripting.TextStream
         Dim NF As String
         NF = NOM_FICHIER_LOG & "_" & Replace(CStr(Today), "/", "_") &
".log"
         Stream = fs.OpenTextFile(NF, Scripting.IOMode.ForAppending, True)
         Stream.WriteLine(CType(System.DateTime.Now, String))

         Stream.WriteLine(sTitre & " : " & sMsg)
         Debug.WriteLine(sMsg, sTitre)
         Stream.Close()
         bLogImprimé = True
     End Sub
Author
22 Apr 2006 11:21 AM
Cor Ligthert [MVP]
Bernard,

Are you sure that there is not a blank line.

Debug.WriteLine("", vbNullString)
By instance because this is happening

I hope this helps,

Cor



Show quoteHide quote
"Bernard Bourée" <bern***@bouree.net> schreef in bericht
news:evdtOCfZGHA.1192@TK2MSFTNGP03.phx.gbl...
> Cor Ligthert [MVP] a écrit :
>> Bernard,
>>
>> Can you show the code?
>>
>> On MSDN is written how to use it, we cannot change that.
>> Now you have only told, that it does not appear. By most of us it appears
>> so you should have done something special.
>>
>> Cor
>>
>> "Bernard Bourée" <bern***@bouree.net> schreef in bericht
>> news:e1GevKeZGHA.4884@TK2MSFTNGP02.phx.gbl...
>>> In order to trace my job I placed some
>>> Debug.Writeline in my code but they don't appear in the output window!
>>> How to solve it?
>>>
>>> Thanks
>>> Bernard
>>>
>>
>>
>>
> Cor
>
> Of course I can show the code.
> I have a small routine in order to trace my code.
> Here it is.
> It was working fine before but now not.
> I have looked at the options but could not find a related item.
>
> Thanks for your help
> Bernard
>
> Public Sub PrintLog(ByVal sMsg As String, Optional ByVal sTitre As String
> = vbNullString)
>
>         Dim fs As New Scripting.FileSystemObject
>         Dim Stream As Scripting.TextStream
>         Dim NF As String
>         NF = NOM_FICHIER_LOG & "_" & Replace(CStr(Today), "/", "_") &
> ".log"
>         Stream = fs.OpenTextFile(NF, Scripting.IOMode.ForAppending, True)
>         Stream.WriteLine(CType(System.DateTime.Now, String))
>
>         Stream.WriteLine(sTitre & " : " & sMsg)
>         Debug.WriteLine(sMsg, sTitre)
>         Stream.Close()
>         bLogImprimé = True
>     End Sub
>
Author
22 Apr 2006 2:25 PM
Bernard_Bourée
Cor Ligthert [MVP] a écrit :
Show quoteHide quote
> Bernard,
>
> Can you show the code?
>
> On MSDN is written how to use it, we cannot change that.
> Now you have only told, that it does not appear. By most of us it appears so
> you should have done something special.
>
> Cor
>
> "Bernard Bourée" <bern***@bouree.net> schreef in bericht
> news:e1GevKeZGHA.4884@TK2MSFTNGP02.phx.gbl...
>> In order to trace my job I placed some
>> Debug.Writeline in my code but they don't appear in the output window!
>> How to solve it?
>>
>> Thanks
>> Bernard
>>
>
>
>
Cor

No I have a break point on it and have cheked that the string is not empty

Bernard
Author
26 Apr 2006 7:23 PM
Sam Malone
Show quote Hide quote
"Bernard Bourée" <bern***@bouree.net> wrote in message
news:un8rlihZGHA.2136@TK2MSFTNGP05.phx.gbl...
> Cor Ligthert [MVP] a écrit :
>> Bernard,
>>
>> Can you show the code?
>>
>> On MSDN is written how to use it, we cannot change that.
>> Now you have only told, that it does not appear. By most of us it appears
>> so you should have done something special.
>>
>> Cor
>>
>> "Bernard Bourée" <bern***@bouree.net> schreef in bericht
>> news:e1GevKeZGHA.4884@TK2MSFTNGP02.phx.gbl...
>>> In order to trace my job I placed some
>>> Debug.Writeline in my code but they don't appear in the output window!
>>> How to solve it?
>>>
>>> Thanks
>>> Bernard
>>>
>>
>>
>>
> Cor
>
> No I have a break point on it and have cheked that the string is not empty
>
> Bernard
>
Just for fun how about trying Debug.Print instead of Debug.Writeline?  It
should make no difference but then what you're doing "should" work (assuming
you're in debug mode).
Author
22 Apr 2006 9:34 AM
Cerebrus
Are your Debug statements being hit at all ? You can test for this by
setting a breakpoint at the line, and testing if execution stops there.

Regards,

Cerebrus.
Author
22 Apr 2006 11:27 AM
Herfried K. Wagner [MVP]
"Bernard Bourée" <bern***@bouree.net> schrieb:
> In order to trace my job I placed some
> Debug.Writeline in my code but they don't appear in the output window!

Are you running the project using the Release or Debug configuration?  Maybe
switching to the Debug configuration fixes the problem.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>