vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

Option to set where the browse DB is stored

Open johnfredcee opened this issue 9 years ago • 6 comments

As of 0.10.3 it seems that browse data is built dynamically under %APPDATA%. In my case this is on a SSD which is tight on space and this is space-hungry when I use it on large projects. Some option to be able to store it elsewhere would be good.

johnfredcee avatar Mar 13 '17 12:03 johnfredcee

You can change the DB location by editing the databaseFilename property for the configurations you care about in your c_cpp_properties.json

bobbrow avatar Mar 13 '17 15:03 bobbrow

So, it's a full path and just not a filename?

johnfredcee avatar Mar 13 '17 20:03 johnfredcee

It was initially intended to a be a full path, but a name will also work. It only works for your current workspace though and if you want to clean up space you'll need to delete your workspaceStorage folder in AppData. I put a request for VS Code to add a setting to change the workspaceStorage location to another drive (or we could add a setting ourselves), so that the default isn't on the C drive.

sean-mcmanus avatar Mar 13 '17 20:03 sean-mcmanus

@sean-mcmanus, may I know will you add the setting to change the workspaceStorage location to another driver? Current my C driver only have 1GB, but the symbols files take up about 6GB. Thanks!

vscpp avatar Aug 22 '17 08:08 vscpp

We are not able to change the workspaceStorage location. That setting is owned by VS Code. But you can change the database location by setting the "browse.databaseFilename" setting in c_cpp_properties.json to a path on your other drive.

bobbrow avatar Aug 22 '17 16:08 bobbrow

@vscpp I don't think we're planning to add that setting soon due to higher priority tasks, but if we're able to open source the typescript part of our extension, then users could contribute such a setting. It may also be possible to modify the javascript/json files yourself to add the setting (the line that sets it is storage_path: util.extensionContext.storagePath, in .vscode/extensions/ms-vscode.cpptools-0.12.3/out/src/LanguageServer/C_Cpp.js. But just doing what Bob said might be easier (you'll also want to periodically delete the partially completed database files at your workspace storage location on your C drive to get more disk space back).

sean-mcmanus avatar Sep 06 '17 15:09 sean-mcmanus