Debugging in VS2005 - why is some code shaded grey?

  • Thread starter Thread starter Andrew Kidd
  • Start date Start date
A

Andrew Kidd

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.
 
Andrew Kidd said:
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?
 
Andrew Kidd said:
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.
 
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
 
Hi Joergen ... that's what I'm suspecting, just wanting confirmation as I
couldn't find anything in the documentation.
 
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.
 
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.
 
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.
 
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/
 
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,
 
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/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top