views:

81

answers:

2

In visual studio 2008, when the focus is on a watch expression in the watch window, how can I edit this expression without double-clicking the mouse?

In visual C++ 6, it was the obvious: the F2 key. This is the consistent Windows behavior in listviews, e.g. for renaming a file in Explorer, editing a cell in Excel, etc. For some reason someone decided to remove this shortcut from VS. I can't find anything like it in the keyboard shortcuts awful little window.

This is annoying me to no end. I DO NOT want to reach for my mouse when I'm debugging.

A: 

This just works for me.

F2 starts editing. It also starts editing when I just start typing any text. I'm using VS2008 C++/CLI.

demoncodemonkey
A: 

Thanks, I found out what was the problem. I had previously assigned F2 to the Edit.NextBookmarkInDocument command in VS. This is the same as it was in VC6 (in VS 2003 and forward, in the "Visual C++ 6" keyboard mapping scheme, F2 is Edit.NextBookmark, which goes through all the bookmarks in all the files, which I find distracting and not very useful).

When I assigned it, I assigned it in the Text Editor context only (that is, in the Keyboard shortcut windows I put "Text Editor" in the "Use New Shortcut In".

But for some reason when I'm in the watch window, pressing F2 there takes me away from the watch window and into the text editor. This looks like a bug to me, because I double checked and I don't have any global mapping for F2.

Does anyone else have any solution to this?

OrWhen