Editing during Debugging

Joined
Jun 5, 2004
Messages
5
Programming Experience
1-3
Hi All !
Is it possible in VB.net projects to edit my code while debugging .. as was possible in VB6... I tried to search it in menus but couldnt find any option to enable editing during debugging. So if i get some error(s) then i have to end the application and then to change the code and then again run it to view the desired result. Can anyone tell how to make life easier in VB.Net ???
 

Paszt

Staff member
Joined
Jun 3, 2004
Messages
1,500
Location
Raleigh, NC - USA
Programming Experience
Beginner
Until the next release of VB.NET you can't edit the code like in VB6.

Click the menu Tools -> Options. Under the Debugging group on the right side, click Edit and Continue. On the left side, about halfway down, there's a checkBox that says "Allow me to edit VB files while debugging" with several radio buttons underneath that, "Warn me if I make changes" (you'll be prompted to restart or ignore), "Always restart my program after I make changes", and "Always ignore changes and continue debugging". I use Visual Studio 2002 so the options may have changed in 2003, I'm not sure.

So you see, you can make changes but the changes are ignored until you restart. This will be fixed in the next release.
 

mzim

Well-known member
Joined
Jun 3, 2004
Messages
187
Location
Other side of the rock
Programming Experience
1-3
Paszt said:
Until the next release of VB.NET you can't edit the code like in VB6.

Click the menu Tools -> Options. Under the Debugging group on the right side, click Edit and Continue. On the left side, about halfway down, there's a checkBox that says "Allow me to edit VB files while debugging" with several radio buttons underneath that, "Warn me if I make changes" (you'll be prompted to restart or ignore), "Always restart my program after I make changes", and "Always ignore changes and continue debugging". I use Visual Studio 2002 so the options may have changed in 2003, I'm not sure.

So you see, you can make changes but the changes are ignored until you restart. This will be fixed in the next release.
halu...paszt ive tried your instructions but it doesn't work in mine..
im using VS 2002..

pls. help
 

mzim

Well-known member
Joined
Jun 3, 2004
Messages
187
Location
Other side of the rock
Programming Experience
1-3
Paszt said:
Are you able to find the options?

What is it that's not working correctly?
yes...i find the options and i follow your instructions.
but i cant still edit the code..

not just like C#.

tanx...in advance
 

Paszt

Staff member
Joined
Jun 3, 2004
Messages
1,500
Location
Raleigh, NC - USA
Programming Experience
Beginner
You have to be stepping through the code in order to edit.

Remeber though, the changes won't be incorporated until you restart the app.
 

mzim

Well-known member
Joined
Jun 3, 2004
Messages
187
Location
Other side of the rock
Programming Experience
1-3
Paszt said:
You have to be stepping through the code in order to edit.

Remeber though, the changes won't be incorporated until you restart the app.
im new in this thing..
tanx paszt for the info...but i cant still edit the code
"cannot currently modify this text in the editor. It is read-only."

not just like c# i can edit while it is running...
i dont know what happend to my VS 2002.
tanx a lot.
 
Joined
Jun 5, 2004
Messages
5
Programming Experience
1-3
Dear mzim!
Probably you are trying to modify your code while running the application .. but it will not allow you to edit if you dont "PAUSE" your application. (The same behaviour as was in VB6). So while debugging if you want to edit then along with setting those option told by Paszt, you'll have to PAUSE the application by pressing the Pause symbol " II " in tool bar. I think this is the problem in your case.
[ And it is good to see in VB.Net that while debugging, our edited code can be Saved when we press Ctrl+S (or any equvalent) ... which was not possible in VB6... ]
 
Top Bottom