While in debug mode, the solution explorer has a Script Documents section. It is expanded by default. As the debugger runs, new ScriptDocumentxxx poll.txt
files are added to this section. As I am navigating the explorer files, the adding of these new line items causes the entire contents of the explorer to shift downward. This is quite annoying if I am trying to find a file or trying to click something. I can collapse the section manually, but I'd rather not have to do this all of the time.
-
18I'm tempted to edit this and replace "quite annoying" with "very annoying"– MickDec 5, 2014 at 6:46
-
did you already found a solution?– JoelDec 15, 2016 at 13:47
-
@Joel Nope. Oddly, it eventually seemed to just resolve itself. I am also using VS2015 now and it doesn't seem to have that problem.– oscilatingcretinDec 15, 2016 at 15:25
-
I had the problem with visual studio 2015. Using any other browser than internet explorer fixed the issue for me!– JoelDec 15, 2016 at 16:05
6 Answers
Right click the projects you are interested in working on and click on 'Scope to this'. This will hide everything (Including the scripts folder) except those projects you selected.
-
1Why would I do this when I may as well just collapse the section? Jun 9, 2014 at 15:40
-
You can select only the scripts you are interested in, the others will be hidden. Jun 12, 2014 at 11:37
-
6
-
5@mbomb007: Click the "Home" icon (third one by default, the one with a house pictogram) in the Solution explorer.– Yi ZengJan 11, 2018 at 4:22
-
Upvoting this even though it does not answer the question, would love to know how to <b>permanently</b> collapse or even hide this folder! Apr 26, 2018 at 8:16
I got annoyed enough with this that I turned off JavaScript debugging. If you are willing to go that far, the scripts are gone.
The path for turn of JS debugging is:
Tools -> Options -> Debugging -> General -> Enable JavaScript debugging for ASP.NET (Chrome, Edge and IE) (Visual Studio 2017 and 2019)
Note: This method does not prevent you from stepping though JS in the Chrome inspection tools so you do not lose that ability. You lose both the scripts (of course) and that new Chrome window that pops up when you launch the debugger.
-
This does it for me, and is easily reversible should I need to. Thank you!– RedMay 1, 2018 at 8:10
-
Yes, the reversibility is great and the only complaint I hear is too many new windows being generated by VS with this method. I'd rather close a couple windows than deal with Solution Explorer jumping around. So, that trade-off is going to always be a matter of personal opinion.– JoeMay 1, 2018 at 20:58
-
With the setting ON it will open a new instance, which closes when code is stopped. With the setting OFF it will open a new tab in the current instance, which won't close automatically. If you have multiple instances of your browser open, it can be a bit annoying tabbing through them to find the right one. I guess the answer to all of this is to setup a local site support.microsoft.com/en-gb/help/323972/… and just build your code, not run it.– RedMay 2, 2018 at 8:26
-
I like this because, needing script debugging for other project doesn't create that work flow of consistently turn off and on script debugging. Jul 4, 2019 at 3:15
Right click then 'Scope to This' to hide everything but the project in the solution you want to view.
Click on the Home/House icon to reverse it.
Yes there is. One way is to create a visual studio add-in or extension which monitors the solution explorer tree and collapses the "script documents" -item if it is expanded.
If you need code samples and/or a fully functional add-in just let me know. You have Visual Studio 2013, ay? Is it the express edition or what?
-
6Creating a whole add-on for VS just to auto-collapse a section is more trouble than it's worth. The development time will most likely not offset the time I will save not having to collapse it myself. Jun 9, 2014 at 15:41
-
That is very true but also that is the only solution I could come up with. Resharper has some feature(s) for collapsing solution items but I'm not sure if those can be automated. You can also enable silverlight debugging which should hide the script documents, but then you might not be able debug your scripts. Not sure about that.– Dave81Jun 10, 2014 at 7:09
-
1This is basically what I've been looking for more and more as that "Script documents" folder started to grow in my project. I'd love to see a plugin like this for VS 2015, can't find anything that does it in the Visual Studio Gallery, sadly.– CerbrusAug 7, 2015 at 6:07
This is confirmed bug in VS 2019. Just Microsoft is not so fast about fixing it.