By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,728 Members | 2,480 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,728 IT Pros & Developers. It's quick & easy.

Debugging in VS2005 - why is some code shaded grey?

P: n/a
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.
Jan 5 '06 #1
Share this Question
Share on Google+
10 Replies


P: n/a

"Andrew Kidd" <an****@nospam.com> wrote in message
news:ue*************@TK2MSFTNGP10.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.

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?
Jan 5 '06 #2

P: n/a

"Andrew Kidd" <an****@nospam.com> wrote in message
news:ue*************@TK2MSFTNGP10.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.
Jan 5 '06 #3

P: n/a

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" <an****@nospam.com>
wrote:
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" <pv****@newsgroups.nospam> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...

"Andrew Kidd" <an****@nospam.com> wrote in message
news:ue*************@TK2MSFTNGP10.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.



Jan 5 '06 #4

P: n/a
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<NOSPAMNOSPAM> wrote in message
news:lr********************************@4ax.com...

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" <an****@nospam.com>
wrote:
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" <pv****@newsgroups.nospam> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl.. .

"Andrew Kidd" <an****@nospam.com> wrote in message
news:ue*************@TK2MSFTNGP10.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.


Jan 5 '06 #5

P: n/a
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
ci**************@msn.com www.cindywinegarden.com
"Andrew Kidd" <an****@nospam.com> wrote in message
news:ue*************@TK2MSFTNGP10.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.

Jan 5 '06 #6

P: n/a
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.public.dotnet.languages.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.
Jan 6 '06 #7

P: n/a
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
ci**************@msn.com www.cindywinegarden.com
"Cindy Winegarden" <ci**************@msn.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Hi Andrew,

Have you stepped through the list in your Fonts and Colors settings to see
what's back-shaded gray?

Jan 6 '06 #8

P: n/a
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
http://pjondevelopment.50webs.com/

Jan 6 '06 #9

P: n/a

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,
Ma***********@feedback.microsoft.com wrote:
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.public.dotnet.languages.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.


Jan 6 '06 #10

P: n/a
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.public.dotnet.languages.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
http://pjondevelopment.50webs.com/
Jan 9 '06 #11

This discussion thread is closed

Replies have been disabled for this discussion.