Debugging in VS2005 - why is some code shaded grey?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andrew Kidd

    Debugging in VS2005 - why is some code shaded grey?

    I see this when I'm stepping through in the debugger ... just thought I'd
    ask, and I just know it's going to be one of those "Doh" moments, but it's
    got me foxed just now.


  • pvdg42

    #2
    Re: Debugging in VS2005 - why is some code shaded grey?


    "Andrew Kidd" <andrew@nospam. com> wrote in message
    news:uerihYeEGH A.212@TK2MSFTNG P10.phx.gbl...[color=blue]
    >I see this when I'm stepping through in the debugger ... just thought I'd
    >ask, and I just know it's going to be one of those "Doh" moments, but it's
    >got me foxed just now.
    >[/color]
    What kind of project, and which language?
    When I debug C++ or C# code, the comments are grayed, but no other
    statements.
    Can you give an example of a grayed statement in the code you're debugging?


    Comment

    • pvdg42

      #3
      Re: Debugging in VS2005 - why is some code shaded grey?


      "Andrew Kidd" <andrew@nospam. com> wrote in message
      news:uerihYeEGH A.212@TK2MSFTNG P10.phx.gbl...[color=blue]
      >I see this when I'm stepping through in the debugger ... just thought I'd
      >ask, and I just know it's going to be one of those "Doh" moments, but it's
      >got me foxed just now.[/color]
      Please disregard part of my previous. I'm not awake yet (obviously). You're
      using VB.
      Still. an example of a grayed statement would be useful.


      Comment

      • Joergen Bech

        #4
        Re: Debugging in VS2005 - why is some code shaded grey?


        Isn't that just to indicate the block of code matching up with the
        selected line (in this case "Try")?

        I would expect the same behavior for If ... Then, For ... Next, etc?

        /Joergen Bech



        On Thu, 5 Jan 2006 14:58:12 -0000, "Andrew Kidd" <andrew@nospam. com>
        wrote:
        [color=blue]
        >I know that feeling ... ;-) ... I don't mean the colour of the text in the
        >code window, I mean the background (see the attached example).
        >
        >If I set the breakpoint to the Try of a Try ... Catch block, then the Catch
        >statements have their background colour set to grey ... ???
        >
        >
        >"pvdg42" <pvdg42@newsgro ups.nospam> wrote in message
        >news:%23arngYf EGHA.3004@TK2MS FTNGP15.phx.gbl ...[color=green]
        >>
        >> "Andrew Kidd" <andrew@nospam. com> wrote in message
        >> news:uerihYeEGH A.212@TK2MSFTNG P10.phx.gbl...[color=darkred]
        >>>I see this when I'm stepping through in the debugger ... just thought I'd
        >>>ask, and I just know it's going to be one of those "Doh" moments, but it's
        >>>got me foxed just now.[/color]
        >> Please disregard part of my previous. I'm not awake yet (obviously).
        >> You're
        >> using VB.
        >> Still. an example of a grayed statement would be useful.
        >>
        >>[/color]
        >
        >[/color]

        Comment

        • Andrew Kidd

          #5
          Re: Debugging in VS2005 - why is some code shaded grey?

          Hi Joergen ... that's what I'm suspecting, just wanting confirmation as I
          couldn't find anything in the documentation.


          "Joergen Bech @ post1.tele.dk>" <jbech<NOSPAMNO SPAM> wrote in message
          news:lreqr1pmcl u4rhp7a8fpvj7v0 l1foopffj@4ax.c om...[color=blue]
          >
          > Isn't that just to indicate the block of code matching up with the
          > selected line (in this case "Try")?
          >
          > I would expect the same behavior for If ... Then, For ... Next, etc?
          >
          > /Joergen Bech
          >
          >
          >
          > On Thu, 5 Jan 2006 14:58:12 -0000, "Andrew Kidd" <andrew@nospam. com>
          > wrote:
          >[color=green]
          >>I know that feeling ... ;-) ... I don't mean the colour of the text in the
          >>code window, I mean the background (see the attached example).
          >>
          >>If I set the breakpoint to the Try of a Try ... Catch block, then the
          >>Catch
          >>statements have their background colour set to grey ... ???
          >>
          >>
          >>"pvdg42" <pvdg42@newsgro ups.nospam> wrote in message
          >>news:%23arngY fEGHA.3004@TK2M SFTNGP15.phx.gb l...[color=darkred]
          >>>
          >>> "Andrew Kidd" <andrew@nospam. com> wrote in message
          >>> news:uerihYeEGH A.212@TK2MSFTNG P10.phx.gbl...
          >>>>I see this when I'm stepping through in the debugger ... just thought
          >>>>I'd
          >>>>ask, and I just know it's going to be one of those "Doh" moments, but
          >>>>it's
          >>>>got me foxed just now.
          >>> Please disregard part of my previous. I'm not awake yet (obviously).
          >>> You're
          >>> using VB.
          >>> Still. an example of a grayed statement would be useful.
          >>>
          >>>[/color]
          >>
          >>[/color]
          >[/color]


          Comment

          • Cindy Winegarden

            #6
            Re: Debugging in VS2005 - why is some code shaded grey?

            Hi Andrew,

            Have you stepped through the list in your Fonts and Colors settings to see
            what's back-shaded gray? I've got several things that are. If you're not
            sure which it is, try changing the items to some bright color one-by-one and
            see if that shows up in your code.

            --
            Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
            cindy_winegarde n@msn.com www.cindywinegarden.com


            "Andrew Kidd" <andrew@nospam. com> wrote in message
            news:uerihYeEGH A.212@TK2MSFTNG P10.phx.gbl...[color=blue]
            >I see this when I'm stepping through in the debugger ... just thought I'd
            >ask, and I just know it's going to be one of those "Doh" moments, but it's
            >got me foxed just now.
            >[/color]


            Comment

            • Matthew.Gertz@feedback.microsoft.com

              #7
              re: Debugging in VS2005 - why is some code shaded grey?

              In VB2005, Edit and Continue is finally possible while debugging. Code which is grey cannot be edited during debugging (because it would require a total recompilation of the project for whatever reason -- public method, exception handler redirection, etc.) -- that's all it means.

              Hope this helps!
              --Matt Gertz--*
              VB Compiler Dev Lead

              -----Original Message-----
              From: Andrew Kidd
              Posted At: Thursday, January 05, 2006 2:53 AM
              Posted To: microsoft.publi c.dotnet.langua ges.vb
              Conversation: Debugging in VS2005 - why is some code shaded grey?
              Subject: Debugging in VS2005 - why is some code shaded grey?


              I see this when I'm stepping through in the debugger ... just thought I'd
              ask, and I just know it's going to be one of those "Doh" moments, but it's
              got me foxed just now.

              Comment

              • Cindy Winegarden

                #8
                Re: Debugging in VS2005 - why is some code shaded grey?

                Turns out it's tied to the "Visual Basic Read Only Marker" in the Options >
                Fonts and Colors > Display items dialog, which makes sense since, as Matt
                said, it can't be edited during debugging.

                --
                Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
                cindy_winegarde n@msn.com www.cindywinegarden.com


                "Cindy Winegarden" <cindy_winegard en@msn.com> wrote in message
                news:%23YyakEjE GHA.3468@TK2MSF TNGP15.phx.gbl. ..[color=blue]
                > Hi Andrew,
                >
                > Have you stepped through the list in your Fonts and Colors settings to see
                > what's back-shaded gray?[/color]


                Comment

                • PJ on Development

                  #9
                  Re: Debugging in VS2005 - why is some code shaded grey?

                  Apart from your kind repply, Matt...

                  I'd like to say that's great that developers from MS are actually
                  exchanging thoughts with the developer community.

                  It's a wonderful thing being able to interact with the real people who
                  develops the tools we use.

                  Thanks...

                  PJ


                  Comment

                  • Joergen Bech

                    #10
                    Re: Debugging in VS2005 - why is some code shaded grey?


                    Thanks for clearing that up. I hadn't noticed it before.

                    Very useful. After a long time with VS2003 I had gotten used
                    to NOT having edit'n'continue , so I hardly ever use it, even
                    though it is there now. Did not make the connection.

                    Regards,

                    Joergen Bech



                    On Thu, 05 Jan 2006 15:52:03 -0800,
                    Matthew.Gertz@f eedback.microso ft.com wrote:
                    [color=blue]
                    >In VB2005, Edit and Continue is finally possible while debugging. Code which is grey cannot be edited during debugging (because it would require a total recompilation of the project for whatever reason -- public method, exception handler redirection, etc.) -- that's all it means.
                    >
                    >Hope this helps!
                    > --Matt Gertz--*
                    > VB Compiler Dev Lead
                    >
                    >-----Original Message-----
                    >From: Andrew Kidd
                    >Posted At: Thursday, January 05, 2006 2:53 AM
                    >Posted To: microsoft.publi c.dotnet.langua ges.vb
                    >Conversation : Debugging in VS2005 - why is some code shaded grey?
                    >Subject: Debugging in VS2005 - why is some code shaded grey?
                    >
                    >
                    >I see this when I'm stepping through in the debugger ... just thought I'd
                    >ask, and I just know it's going to be one of those "Doh" moments, but it's
                    >got me foxed just now.[/color]

                    Comment

                    • Matthew.Gertz@feedback.microsoft.com

                      #11
                      Re: Debugging in VS2005 - why is some code shaded grey?

                      I must assure you that it's a two-way street :-). It's fun to code up a language and language services, particularly one which has as wide a reach as VB, but it's impossible to predict all of the billions of ways that customers are going to use it, and without the customer contact, we developers tend to get a little isolated from customers and the directions that they want to head. There's certainly been more than one occasion where Product Support has handed us a customer bug and we've scratched our heads and thought "Oh, cool idea, but who knew that customers were going to need to use the product *that* way?" Ergo, for the past 3 or so years, we've been trying to build up a better presence on the newsgroups, forums, and blogs so that we can help people get the most out of the product, but almost more importantly to get a better idea what people need.

                      Have you checked out the forums at http://forums.microsoft.com? A lot of MS folk hang out there as well (including me), and the only reason I don't additionally have a blog that 90% of what I do each day would be utterly tedious to read. ("Triaged 54 bugs today, attended Divisional Tactics meeting to plan milestone exit criteria, verified that VB was on track to meet stepdown goals for known code defects" ... yawn...)

                      --Matt--*

                      -----Original Message-----
                      From: PJ on Development
                      Posted At: Thursday, January 05, 2006 11:22 PM
                      Posted To: microsoft.publi c.dotnet.langua ges.vb
                      Conversation: Debugging in VS2005 - why is some code shaded grey?
                      Subject: Re: Debugging in VS2005 - why is some code shaded grey?


                      Apart from your kind repply, Matt...

                      I'd like to say that's great that developers from MS are actually
                      exchanging thoughts with the developer community.

                      It's a wonderful thing being able to interact with the real people who
                      develops the tools we use.

                      Thanks...

                      PJ

                      Comment

                      Working...