While I'm debugging a page with a break point in our ASP.NET web site in Visual Studio 2015, an extra tab is opened for the same file once the break point is reached:
After I stop debugging, the tab remains open and has focus... at which point I begin to make changes to fix something, etc. However, this tab stops showing Intellisense, nags with a dialog about unsaved changes inside this editor and has been changed externally, etc.
After some checking, it turns out the extra tab that gets opened during debugging (blue tab) is the local file from my local version of the website, while the original tab (brown tab) is my file from my local TFS development directory.
This extra tab is fairly annoying to my workflow and I'd rather it didn't show up, or at least that it disappeared after debugging so that I could continue programming happily. However, despite my best Google-Fu and looking through the options in Visual Studio, I cannot find a way to either disable this feature or hide this tab after debugging... maybe there isn't a way.
Anyone have the same issue and know a solution? A grateful programmer would thank you if you do. :) Thanks.
Related
hoping somebody has run into this issue and knows a fix as it's driving me up the wall...
I mainly write web applications at my place of work and we've recently got our upgrade to Visual Studio 2015 Professional (Version 14.0.23107.0).
Since my first fresh install (and subsequent reinstalls) whenever I attach to a process to debug all my code windows disappear. If I click on the "Windows" menu bar item then I can still see those that have disappeared, but when I try to open them they refuse to appear.
If a breakpoint was get hit on one of those "missing" files then I would get the standard "browse to find source" window you often get when using 3rd party libraries.
What I have to do at the moment is place all my break points, close all my windows and then attach to my w3p.exe process. It's pretty annoying and I was wondering if anyone else had encountered this?
For reference, I'm using IIS 7.5.7600 on Windows 7 Professional on SP1.
Below is an example image of what I see when, on a brand new ASP.NET 4.6 project, when I place a breakpoint on the Index method in HomeController. If I click "Browse and find HomeController.cs" absolutely nothing happens.
Does anyone know what I can do to alleviate this issue?
EDIT: Also happens when debugging straight from Visual Studio using IISExpress
I'm currently using VS Community 2013 but I've seen this behaviour in previous versions of VS.
Scenario: I have previously saved and closed a solution whilst it has several tabs open. I then re-open the solution. The open tabs reload, but (as far as I can tell randomly) one or more of the aspx files that were open when I last saved and closed the solution, are recreated as a blank file with the extension aspx:1 or aspx:2.
Closing the blank file & reopening that file from the Solution Explorer restores the correct version of the file. No work is lost, so I admit this is an irritation rather than a crisis.
What's going on, and more importantly any idea how I can make it stop? I have got the Preview Tab functionality (Options >> Environment >> Tabs and Windows) turned off. Thanks
http://ambracode.com/index/show/161001
it says there:
"It's the naming convention for Visual Studio when the window is cloned. Sometimes, however, Visual Studio just gets confused and names it that way."
In Visual Studio 2010 SP1, automatic outlining is not enabled for ASPX files when I open them. For each file opened, I need to click Edit / Outlining / Start automatic outlining, which is extremely annoying. This step is not necessary when code-only (non-ASPX) files are opened.
I use a few extensions, all of them from MS, including Power Tools, the JavaScript tools, etc., and I thought that maybe they were causing the problem, so I disabled all of them and restarted VS, but the problem still exists.
I did not have this problem with VS2010 (no SP) on Win XP Pro, which I used for about 18 months, but I recently did a clean install of Win 7 x64, VS2010, and VS2010 SP1, and now I have this issue.
Any ideas?
This worked for me:
In the registry, look here:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\HTML Editor
for a value named OutlineHTMLOnFileOpen. Mine was set to 0, change it to 1. Make sure you do this while VS is closed, as it saves this value out on exit and will change it back.
I had this issue and it was driving me crazy all week!!
Finally managed to fix it really easy:
Make sure the registry value for OutlineHTMLOnFileOpen is set to: -1
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\HTML Editor
OutlineHTMLOnFileOpen = -1
Open VS then open an aspx file.
Press CTRL M then M again while keeping the CTRL key depressed.
Press Ctrl+ M M
Wait a few moments and the automatic outlining engine will start.
Restart VS and it should auto kick in again when you open a file.
I had the same problem and went through and disabled my extensions. Once I disabled the Javascript Addins from Microsoft (That give the outlining and brace matching), I found I was able to change the registry setting and it didn't set change back. I'm going to reinstal the addin to see if it was the actual cause.
I posted the same question at the MS forums, and was told to do the following, which I have not yet had time to try, but I thought I would add it here for now:
Please try to create two new project (one is the same type project as
your previous project, one is another type project.) see whether this
issue still exists.
If this issue still exists, you can try the following solutions:
If we reboot the operating system to safe mode, do we have the
problem? This can help to isolate whether any other applications are
interfering with Visual Studio. Note that some features (like IIS) are
not available under safe mode. Please check whether this can apply or
not. In addition to safe mode, we can also suggest “clean boot”:
http://support.microsoft.com/kb/310353 .
If we create a new user account, do we have the problem? This can
help to isolate user profile corruption related causes.
If we use “devenv.exe /resetsettings”, does it solve the problem?
It restores Visual Studio default settings.
If the problem remains, we can use Visual Studio Setup Wizard (via
Control Panel) to repair Visual Studio. It can restore the Visual
Studio Installation into its original state.
The forum thread is here.
I will provide my results if I make progress.
Using Ctrl + M should toggle this if you're focused on the file having trouble. I had the same problem until I realized had been accidentally using the hot keys to turn this on and off.
Alright, I've been searching forever and can't find the answer to this.
So on my work computer I run Windows 7 and Visual Studio 2005. I have a ASP.NET project (2.0) and let's say I hit F5 and start debugging. Now, once a page is done rendering I can edit the content or the codebehind code of the page without it throwing any error messages (just like if the project was stopped). Then if I save the file and hit refresh on the current debugging browser, it'll take a minute to recompile the project automatically and then refresh with the recompiled code. I can ONLY change the code in the ASP.NET project, not any class libraries that the ASP.NET project is dependent upon. I can also set breakpoints and it'll hit them (so it's not like the debugger is not attached or something).
Now on my home computer, I run Windows 7 and Visual Studio 2010. I have an ASP.NET project (4.0) and let's say I hit F5 and start debugging. Now, it doesn't matter if the page it done rendering or not - I cannot change ANY of the code behind, although I can change the content. If I attempt to I get a message saying
"Changes are not allowed while code is running or if the option 'Break all processes when one process breaks' is disabled. The options can be enabled in Tools, Options, Debugging."
That being said, if I put a break point, refresh the page and hit the breakpoint THEN I can change the code and then hit F5 to continue.
So my question is - what EXACTLY do I need to do to get it to work like my work computer? It's REALLY annoying to have to stop the project or be clicking breakpoints all over to edit one little piece of code (especially when I'm so used to not having to do that at work). Is this some change in Visual Studio 2010 or something? From what I've read, how it's working at home is the real "Edit and Continue", but I can't figure out what to call it on how it works with my work pc.
Another difference (might be of help):
I set it up so that my IIS goes to the project folder, and then run the project outside of the debugger on both my work and home machines.
Now on my work machine I can make a change to the code and when I hit refresh on the non-debugged browser it'll do the same pause for recompile and then refresh the screen.
On my home machine if I make a change to the code and save it and then refresh the non-debugged browser it will not recompile the code.
So this makes me think it's some IIS setting in the end to make it auto-recompile? It clearly doesn't seem to have anything to do with VS since I'm not even going through the VS debugger to access to code at that point.
Just my thoughts: maybe you use on the work WebSite project, but at home WebApplication. In case of application all code will be compiled in the single DLL and changes should be recompiled first. In case of WebSite - each page compiles in different DLL and you can chage any of the page and it will recompile it.
I am attempting to run a web project in vs2008, however it just hangs before launching the ASP.NET development server.
The vertical scroll bar in the solution explorer starts moving up as if lots of new items are appearing (like when the script documents node is filled) and then moves back to the bottom and then moves up again.
I can run the project if I right click on an aspx page and 'View in Browser'.
Anyone had a similar issue?
Thanks
There are few weird bugs comes free with each edition of VS. Dont worry about that. Instead directly running from Development Server, use local IIS hosting. Sometimes because of CSS issues, gets embeded when you switch betch Design and Source windows. Still MS is fixing those bugs. But I can suggest, go your own way...