Debug.Wrile does not appear on the Output Window

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bernard Bourée

    Debug.Wrile does not appear on the Output Window

    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 Ligthert [MVP]

    #2
    Re: Debug.Wrile does not appear on the Output Window

    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" <bernard@bouree .net> schreef in bericht
    news:e1GevKeZGH A.4884@TK2MSFTN GP02.phx.gbl...[color=blue]
    > 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
    >[/color]


    Comment

    • Cerebrus

      #3
      Re: Debug.Wrile does not appear on the Output Window

      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.

      Comment

      • Bernard Bourée

        #4
        Re: Debug.Wrile does not appear on the Output Window

        Cor Ligthert [MVP] a écrit :[color=blue]
        > 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" <bernard@bouree .net> schreef in bericht
        > news:e1GevKeZGH A.4884@TK2MSFTN GP02.phx.gbl...[color=green]
        >> 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
        >>[/color]
        >
        >
        >[/color]
        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.FileS ystemObject
        Dim Stream As Scripting.TextS tream
        Dim NF As String
        NF = NOM_FICHIER_LOG & "_" & Replace(CStr(To day), "/", "_") &
        ".log"
        Stream = fs.OpenTextFile (NF, Scripting.IOMod e.ForAppending, True)
        Stream.WriteLin e(CType(System. DateTime.Now, String))

        Stream.WriteLin e(sTitre & " : " & sMsg)
        Debug.WriteLine (sMsg, sTitre)
        Stream.Close()
        bLogImprimé = True
        End Sub

        Comment

        • Cor Ligthert [MVP]

          #5
          Re: Debug.Wrile does not appear on the Output Window

          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



          "Bernard Bourée" <bernard@bouree .net> schreef in bericht
          news:evdtOCfZGH A.1192@TK2MSFTN GP03.phx.gbl...[color=blue]
          > Cor Ligthert [MVP] a écrit :[color=green]
          >> 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" <bernard@bouree .net> schreef in bericht
          >> news:e1GevKeZGH A.4884@TK2MSFTN GP02.phx.gbl...[color=darkred]
          >>> 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
          >>>[/color]
          >>
          >>
          >>[/color]
          > 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.FileS ystemObject
          > Dim Stream As Scripting.TextS tream
          > Dim NF As String
          > NF = NOM_FICHIER_LOG & "_" & Replace(CStr(To day), "/", "_") &
          > ".log"
          > Stream = fs.OpenTextFile (NF, Scripting.IOMod e.ForAppending, True)
          > Stream.WriteLin e(CType(System. DateTime.Now, String))
          >
          > Stream.WriteLin e(sTitre & " : " & sMsg)
          > Debug.WriteLine (sMsg, sTitre)
          > Stream.Close()
          > bLogImprimé = True
          > End Sub
          >[/color]


          Comment

          • Herfried K. Wagner [MVP]

            #6
            Re: Debug.Wrile does not appear on the Output Window

            "Bernard Bourée" <bernard@bouree .net> schrieb:[color=blue]
            > In order to trace my job I placed some
            > Debug.Writeline in my code but they don't appear in the output window![/color]

            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/>

            Comment

            • Bernard Bourée

              #7
              Re: Debug.Wrile does not appear on the Output Window

              Cor Ligthert [MVP] a écrit :[color=blue]
              > 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" <bernard@bouree .net> schreef in bericht
              > news:e1GevKeZGH A.4884@TK2MSFTN GP02.phx.gbl...[color=green]
              >> 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
              >>[/color]
              >
              >
              >[/color]
              Cor

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

              Bernard

              Comment

              • Sam Malone

                #8
                Re: Debug.Wrile does not appear on the Output Window


                "Bernard Bourée" <bernard@bouree .net> wrote in message
                news:un8rlihZGH A.2136@TK2MSFTN GP05.phx.gbl...[color=blue]
                > Cor Ligthert [MVP] a écrit :[color=green]
                >> 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" <bernard@bouree .net> schreef in bericht
                >> news:e1GevKeZGH A.4884@TK2MSFTN GP02.phx.gbl...[color=darkred]
                >>> 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
                >>>[/color]
                >>
                >>
                >>[/color]
                > Cor
                >
                > No I have a break point on it and have cheked that the string is not empty
                >
                > Bernard
                >[/color]
                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).


                Comment

                Working...