VS2010 - edit while debugging - output to immediate window eg debug.print

I just installed VS2010 Express - the free version.  I have played around with other versions that are not free.

2 things I cannot work out is;

1. Outputting the Debug.print things to the immediate window.

Tools > Options > Debugging > General > Redirect All Output Window Text to the Immediate Window (is CHECKED)

2.  During debugging I cannot change anything at all.

On other versions I could make certain changes to things while debugging.  In this version of VS I get an "Edit and Continue" titled window with -

Changes are not allowed in the following cases
 - When the debugger has been attached to an already running process
 - The code being debugged was optimized at build or runtime
 - The assembly being debugged is loaded as domain neutral
 - The assembly being loaded was loaded through reflection

By default the other Versions would allow this.  I could have even been working on the same code.

I am a VB.net / VS learner.

LVL 20
Who is Participating?
ZhaolaiConnect With a Mentor Commented:
This is a bit strange...
I just downloaded/installed vb 2010 express, and have no problem with debugging/editing. What I can recommend is to reset the settings by Tools->Settings->Reset... and see if it helps.

Or just create a new project and add all your current project files, since you said that there is no problem with a blank project.
nffvrxqgrcfqvvcConnect With a Mentor Commented:

I wonder if your looking at the Console Window and not the Immediate window.
I don't think the immediate window is automatically displayed when you first install VS2010 it's something you need to setup.
Press CTRL + G when your project isn't debugging.
Press CTRL + G while your project is debugging.

This should give you the Immediate Window for both
darbid73Author Commented:
Hi egl1044.  I am looking at the immediate window.  All that I am getting in it is for example this.  If I break immediately before a debug.print and then F8 it just jumps over the debug.print totally.

Step into: Stepping over non-user code 'System.Threading.Thread.CurrentThread.get'
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

I reset my settings mind you I am using the retial version and what you describe is already set to the default behavior.
You are pressing F8 multiple times to step into and over the Debug Print to the next line correct?
Here is the default settings for the retail version, maybe you can match them up to see if anything is missing.

darbid73Author Commented:
Great Effort there.  There is one difference with what you have checked - I dont have break all processes when one process breaks.

darbid73Author Commented:
I hit the submit too quick.

Are you running in Release mode? If so, change it to Debug mode. Then you will see the output. See screen shot below:

darbid73Author Commented:
As per usual it is USER fault.  I have done something to the project I am working on.  I just dont know what.

I set up a new blank VB windows forms project and both editing and debug.print worked fine.

I would love to know what I have done to my current project to do this.

The first thing that I have noticed is - Zhaolai - I dont have the dropdown box in my tool bar what it is called so that I can find it in the huge number of things I can add to a tool bar.

Under Project > Properties > Compile > Configuration = "Active (release)"
Under Project > Properties > Debug > Configuration = "Active (release)"

The thing is if I change this to "Debug" and then close and reopen the Properties page it is back to Active (release).

I am also targeting 3.5 which I have seen caused at least the Beta of VS 2010 problems. I am not using x64
Apparently you are using VB 2010 Express. Not sure if it's available in that version (I am using Pro version). See the screen shot below. The box is called Solution Configuration. If you see it, check it, and then change it to Debug.

darbid73Author Commented:
In that view it is not there.

But when you go Tools > Customize > Toolbar (checked) > Standard (choose) > Add Command (Btn)

Then you get a windows with 2 choices - Under Categories which one has Solution Configurations as a command.
darbid73Author Commented:
yeh thats what I have done, I put that above.

I am just need my solutions configurations command and then I am done with this question.
Here is the solution for you:
1. Tools->Settings->Expert Settings...
2. Tools - options ->Projects and Solutions ->General, Check "Show advanced build configurations"
3. Tools->Customize..., Under Toolbars tab, check Build. Then on Commands tab, click on Toolbar radio button, "Build" should be shown in the dropdown box. Click on Add Command..., under Categories, "Build" should be highlighted. Then on the right box, scroll down  and click on Solution Configurations and then OK.

darbid73Author Commented:
I dont have the "Build" category so I imagine it is not available for the Express.

The solution to my problem is that I made a new project, made new objects and cut and copied the code.  Then debugging and the debug.print and editing worked fine.

There are some good suggestions above on how to make sure that what I have done is the only thing left to do.

Guys due to the effort put in I will split the points.  I hope that is ok.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.