Editing code while debugger is running.

Z

Zytan

I cannot stand being unable to change the code while the debugger is
running.

Is there a way to do this?

thanks,
Zytan
 
P

Peter Duniho

Zytan said:
I cannot stand being unable to change the code while the debugger is
running.

Is there a way to do this?

Upgrade to the paid version of Visual Studio?

Again, I haven't run Express recently enough to know for sure that this
feature is missing from it, but it wouldn't surprise me if it is. It does
exist in the paid version though.

Personally, I have never used "edit and continue" more than a handful of
times since I first saw it years ago. I do see the utility in having it,
but for me it doesn't come up often enough to justify paying extra for it.
But if it's important to you, you may have to get the paid version of Visual
Studio to get it.

Pete
 
Z

Zytan

Upgrade to the paid version of Visual Studio?

Ok, so the full version allows editing the code while the code is
running in the debugger? I want to be explicit, to make sure we're
talking about the same thing.

I am not looking to use Edit and Continue. I just want the code to
run, and when I notice something wrong, I'll go to that file, and
start typing, and let the program continue to run without pausing it.
This is the only way in which I want to edit code. Nothing more
complex, like Edit and Continue (which C# 2005 Express DOES have,
btw).

Zytan
 
P

Peter Duniho

Ok, so the full version allows editing the code while the code is
running in the debugger? I want to be explicit, to make sure we're
talking about the same thing.

I am not looking to use Edit and Continue. I just want the code to
run, and when I notice something wrong, I'll go to that file, and
start typing, and let the program continue to run without pausing it.

Oh. No, I don't know if you can do that in any version of Visual Studio.
I don't think so, since VS (if I recall correctly) locks the source code
while the program is running, and if you edit it while it's paused assumes
you want to "edit and continue". Frankly, I think this is the correct
behavior...what happens if you continue the program, but either because of
an exception or because you broke into the debugger again the instruction
pointer winds up in the code you've been editing? While it would be
theoretically possible for the IDE to track your changes and correlate
them to the PDB, it seems to me that for nearly all programmers allowing
that would just lead to a huge amount of confusion (and way too many
support calls :) ).

Of course, you could just use a different editor and reload the source
file in Visual Studio when you're ready to rebuild. Then VS doesn't have
to deal with source code that doesn't match the running code.

Do you know of ANY development environment that does what you're asking
about here?

Pete
 
Z

Zytan

Oh. No, I don't know if you can do that in any version of Visual Studio.

You could in the old ones with VC++. I am so positive of this because
I find it frustrating every time it rejects my attempt to change, and
I just feel like that I should be able to, and I'm sure this came from
my VC++ experience.
I don't think so, since VS (if I recall correctly) locks the source code
while the program is running, and if you edit it while it's paused assumes
you want to "edit and continue". Frankly, I think this is the correct
behavior...what happens if you continue the program, but either because of
an exception or because you broke into the debugger again the instruction
pointer winds up in the code you've been editing?

I think this may even happen, but I don't care about it since I know
that I'm changing the code. But I think it makes a good effort to
track what has happened, anyway, IIRC.
While it would be
theoretically possible for the IDE to track your changes and correlate
them to the PDB, it seems to me that for nearly all programmers allowing
that would just lead to a huge amount of confusion (and way too many
support calls :) ).

Maybe they removed this, and that was why!!
Of course, you could just use a different editor and reload the source
file in Visual Studio when you're ready to rebuild. Then VS doesn't have
to deal with source code that doesn't match the running code.

I'd run the risk of editing and the IDE not reloading the newest file,
so I'll pass, but thanks for the idea.
Do you know of ANY development environment that does what you're asking
about here?

Older VC++ post VC++6, I think, maybe even for VC6?

Zytan
 
Z

Zytan

Do you know of ANY development environment that does what you're asking
Older VC++ post VC++6, I think, maybe even for VC6?

Yes, this is definitely the case.

Zytan
 

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

Top