Re: VS 2008 undo bug.

Hi, I have found the following bug in VS2008 when using ViEmu

If i start a project running (in my tests i used an asp web project), then I can edit the code while it is running, and a refresh of the page will show my changes.

However, If I hit 'u' for undo, VS locks up stops responding.

The only thing I can do from there is to kill VS2008 and restart.  Obviously this sometimes results in a loss of work.

However, ViEmu is still the only thing that makes VS usable. smile


Re: VS 2008 undo bug.

Shannon, can you let me know more about the specific type of solution you are working on? The exact language and framework and steps to reproduce it easily will be of immense help in trying to address it. Is it necessary to set up IIS in order to run a 'web app' within VS?

It's a severe problem, and I'd like to address it asap.


Re: VS 2008 undo bug.

Im trying to keep my eye on it and work out when it happens.

I suspect that it goes something like this.

Make an edit in a .vb file that corresponds to a .aspx file.
Run the project
use the undo functionality 'u'
Visual studio crashes.
(I suspect the trick us the undo past the point at which you started running the project.  You can edit and undo while runing the project)


aspx files with corresponding .vb files
.NET 2.0 framework
Not necessary to set up IIS in order to run.
Project that Compiles into a class library

Shall let you know more when I get a chance.
I shall also post more information as I spot it.


Last edited by Loose Potato (2008-05-24 04:25:29)


Re: VS 2008 undo bug.

I think that it is specific to .VB files (the only ones i have are related to their corresponding .aspx file).

It just happened again.  I was editing the VB file when I hit the undo key ('u').  VS2008 locked up and required a re-start.

I am having trouble working out how to replicate it, but it is certainly centered around running your project in debug mode, editing it and then using  the undo key ('u').

The problem only seems to occur when I do a partial edit, leaving the page in an un-compilable state.  Then If i use the undo key ('u') I get the crash.

However, I have can not seem to set up a test project that replicates the bug.


Re: VS 2008 undo bug.

Hi Shannon,

I have implemented a fix for the problem. It doesn't allow 'u' to work when you are debugging (this seems to be a VS2008/VB.NET/ASP.NET limitation I can't work around), but it prevents the freeze. You can test it by downloading the following DLL on top of your current one (probably installed in its default location, "C:\Program Files\ViEmu", unless you chose another directory on install):


Make sure all VS sessions are closed when writing over the file. You can check that the new DLL is installed by typing :ver, which should show '2.1.25.undo'.

After this, 'u' should never freeze, but it won't do anything at all if you are debugging a project.

Let me know if this indeed works as described, and I will build & release ViEmu/VS 2.1.26 with this fix.


  - Jon

PS: BTW, checking the Tools|Options|ViEmu checkbox "Prevent VS2005 warning "cannot edit while running"" setting should make Undo work in this case, but it doesn't, for some undocumented reason. If you enable it, though, the toolbar buttons to undo, and ViEmu's 'redo', will indeed work. I tried to tweak it to get 'undo' to work, but there doesn't seem to be any way.


Re: VS 2008 undo bug.

Having used the fix that Jon supplied for me for the last week, I have to say it works.

In short, VS2008 hasnt crashed since (well not as a result of ViEmu) and I havent lost any of the undo functionality that I had before the fix.

Thank you.


Re: VS 2008 undo bug.

Thanks Shannon. I'll prepare an official 2.1.26 build and release it this week. Regards - Jon


Re: VS 2008 undo bug.

I finally built it and uploaded it. Here is the announcement:



  - Jon