Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I'm using VS 2012 and I'm running my web application, Visual Studio locks all (compiled) source files and prevents me from editing them. Which is fine, as the debugger is attached and I will still want it to show me the actual executing code when it breaks.

When I try and type or paste something in a file, it will give me a nice popup telling me me I can't change anything while the code is running.

However, and this is the annoying part, some action may move my cursor after closing said popup. When I press Enter the cursor moves to the start of the line. When I try to paste something, it gets worse, because it will jump to the end of the file. And then I have to find the spot I was looking at, which is quite annoying if the file is fairly large. And having to look it up again also complete breaks my train of thought.

Is there any way to prevent this behaviour? When I can't change something, informing me is fine. But I want the cursor to remain exactly where it was and not jump all over the place.

share|improve this question
    
I'm sorry, I probably mis-undertsand the question, but why don't you stop trying to edit your code during debug? FYI, you don't have to have the debugger running to see your web application, after it starts, the connection remains open (although if you make a change to code you have to perform a build before refreshing the web page) –  Dave Dec 24 '12 at 11:45
    
When looking through the code, I sometimes forget that I am still in debug mode when I decide I need to make a change somewhere. That's when it happens. I'm not trying to purposefully change code while debugging (which is why I said it was fine that files get locked). I've never noticed this behaviour in older versions of Visual Studio. Trying to edit a locked file should not result in the cursor changing it's location. –  René Wolferink Dec 24 '12 at 11:53
2  
@DaveRook Coz the second you know what you have to do to fix the error, you reflexively jump at the code. So, you hit stop and then the behavior Rene is talking about occurs –  mcalex Dec 24 '12 at 11:59
1  
Yes, that is the message I'm getting. But I don't mind that it prevents me from editing. What I mind is that it will move my cursor. So when I stop the solution from running after closing the message and continue with what I wanted to do, my cursor will not be where I was when I first tried to change something. –  René Wolferink Jan 3 '13 at 16:29
1  
I totally know what you're talking about. I tried to submit a bug about this to the Connect Feedback thing in visual studio, but the page's scripts error out! –  uosɐſ Sep 22 '13 at 12:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.