Thank you for the update, and for keeping in touch with all of us)

We'll check if it's related.

    As a quick workaround, I would suggest disabling #region/#endregion outlining in Tools/Options/Text Editor/PHP/Advanced.

    We're looking into it.

      It seems this only happens if you open .php files without having a project/solution.

      Without a solution, Visual Studio doesn't save the outlining state and doesn't restore it properly after reopening the file. Since #region is collapsed by default, Visual Studio always collapses it.

      Also, without a project/solution, most of the features just won't work.

      Is this the case?


      In this case,

      • it's always better to use projects or open a folder (File / Open / Folder)
      • don't delete .vs directory created by Visual Studio - it contains the region's collapsed state
      • or eventually, we can create an option to not collapse #region by default

        The project is opened using the start window through an .sln solution file. (*.sln)
        The .vs directory is intact.

        Still collapses automatically.

          jeHawWebdesign

          I guess, the .php file is a part of the project?

          I can't repro the issue, but I can change the defaults, so region won't get collapsed implicitly - will be done or configurable in next update.

            5 days later

            JakubMisek Sorry for the late reply, things got very hectic for the last few days. Many thanks, appreciate the effort.

              jeHawWebdesign Thank you for the reply, I hope everything is OK.

              I'll prepare a new update soon, it won't collapse #region by default.

                13 days later

                It works, too well. After setting it to false:

                If all regions are collapsed and I open one region to work on it, then either close the file and then open it or close VS and then restart it, all regions are expanded.

                Thanks for trying though.

                The offending VS update (17.9.0) has caused a lot more problems than just this, interface changes without justification, collapsed TypeScript / JavaScript regions not showing tags, etc., they really did a job on this one.

                  jeHawWebdesign At least, we expand the regions by default, so you can see the code :) although, as you said, this needs to be handled by VS (fixed in a future update of VS). In some cases, it just forgets the state of the regions.