Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating connection profile through command palette will format and remove all comments from user setttings in settings.json #959

Closed
heresmike opened this issue Jul 25, 2017 · 4 comments
Assignees
Labels

Comments

@heresmike
Copy link

  • MSSQL Extension Version: 1.1.0
  • VSCode Version: 1.14.1
  • OS Version: Windows 7 Enterprise SP1

Steps to Reproduce:

  1. In Visual Studio Code, type CTRL + , to open the settings.json file
  2. On the right pane within the curly braces on a new line (e.g., the user settings), type //This is a test
  3. Type CTRL + S to save the settings.json file
  4. Follow the steps "Connect to SQL Server" as described in tutorial to create a new valid connection
  5. In Visual Studio Code, type CTRL + , to open the settings.json file
  6. Observe that the comment line has been removed
@heresmike heresmike changed the title Creating connection profile through command palette formats, removes all comments from settings.json Creating connection profile through command palette will format and remove all comments from settings.json Jul 25, 2017
@heresmike heresmike changed the title Creating connection profile through command palette will format and remove all comments from settings.json Creating connection profile through command palette will format and remove all comments from user setttings in settings.json Jul 25, 2017
@kevcunnane
Copy link
Contributor

@madlovin do you know if this just started occurring in 1.1? I think this is likely due to the fact we read in all the JSON and use a serializer to print it out again. That's where we're losing comments. We have some work tagged for the next release to start using the VSCode APIs for reading/writing settings again, which should help with this overall. We can take a look at this when doing that.

@heresmike
Copy link
Author

@kevcunnane I just installed the extension yesterday, so I have no prior experience to share.

@kevcunnane
Copy link
Contributor

Thanks for confirming. I believe this is a long-standing issue in that case. We'll look at it for our next update, hopefully we can fit it in.

@llali llali self-assigned this Sep 19, 2017
@llali
Copy link
Member

llali commented Sep 20, 2017

fixed in #991

@llali llali closed this as completed Sep 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants