Still uses BROWSE.VC.DB even when rename option selected
The DB files don't seem to be excessively large. Although I have the db name set to "databaseFilename" : "chunks.vs.db" - I have both that and a .BROWSE.VC.DB under my AppData\Roaming\Code\User\workspaceStorage\9579cac8ebcc1d93e3a73c892073cd93\ms-vscode.cpptools with modification times within a couple of minutes of the crash times.
(This is on a small C project of just five files)
We should delete the old DB when databaseFilename changes
It re-creates it.
On 14 March 2017 at 16:32, Bob Brown [email protected] wrote:
We should delete the old DB when databaseFilename changes
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Microsoft/vscode-cpptools/issues/558#issuecomment-286479063, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA18abggGylS6BKPbJgIyspeUmvjLq0ks5rlsEOgaJpZM4MboaR .
--
I'm confused. Are you saying that both database files are being used and recreated after you delete them?
Yes - the sequence of events is delete workspaceStorage, start you editor on a project with databaseFilename set somewhere else...after awhile (it can be as much as 20 mins) a new BROWSEDB in worspaceStorage seems to get created, even though the new db was created where you would expect (the databaseFilename setting) within a minute of startup.
Having the same issue. I've set "databaseFilename": ".vscode/browse.db", closed VS code, deleted everything in ~/Library/Application Support/Code/User/workspaceStorage/ and then opened VS code. After a few seconds a new folder will be created within workspaceStorage with the following content.
-rw-r--r-- 1 --- --- 395255808 Apr 6 10:05 .browse.VC.db
-rw-r--r-- 1 --- --- 65536 Apr 6 10:04 .browse.VC.db-shm
-rw-r--r-- 1 --- --- 18107432 Apr 6 10:04 .browse.VC.db-wal
Can you try using ${workspaceRoot}/.vsode/browse.db? I think ".vscode/browse.db" is an invalid path so it's falling back to the workspaceStorage.
Hey that worked thank you. Could that please be added to the documentation on hover? Right now it incorrectly states:
Path to the generated symbol database. Empty string means default to rootfolder/.vscode/.browse.VC.db
@sean-mcmanus , seems c_cpp_properties.json configure file only for current project (c_cpp_properties.json created in current project).
I want to modify databaseFilename setting for each project on my computer, may I know whether extension supports a global setting for databaseFilename? Which is means that if I open a new folder by VS code, the symbol will be created in my databaseFilename, I don't need to update c_cpp_properties.json every time.
Thanks.
@vscpp We haven't implemented a user setting to change the default location yet. There's an issue on the VS Code side about adding a setting for the default storage location: https://github.com/Microsoft/vscode/issues/22557. We also have this issue for making the includePath per-user, which would also apply to the other settings: https://github.com/Microsoft/vscode-cpptools/issues/368 .
@sean-mcmanus, sorry, bother you again. :) I read the Microsoft/vscode#22557, seems the requirement is changing default storage location from Temp to other drive. It's a global setting for all VS code related. But I remember that C/C++ extension will create the symbols file in workspace .vscode folder with old version cpptool. Developer didn't need to update the c_cpp_properties.json file, it was automatic. That was a good idea. But the design changed after one version released, it moved the symbols files to Temp folder. May I know what's the reason for this change? Thanks.
(I introduced the VS code and C/C++ extension to my colleagues, and our project code size is very huge (6GB), so it will take a lot of space in C drive for symbols generation. They complain to me :( )
@vscpp Yeah, we had it in .vscode originally, but we got complaints about that, so we switched it to the workspace storage default. I usually manually set my databaseFilename to "${workspaceRoot}/.vscode/somename.db", which is the original behavior. Adding a user setting to revert to the original behavior would be sufficient, right? i.e. something like defaultDatabaseLocation with setting "workspaceStorage" (current behavior) or "workspaceFolder" (original behavior).
@sean-mcmanus, Thanks very much for your reply. Seems Cpptool has the ability to change the default storage location between workspace storage and workspace folder. And It's a good idea that add a user setting for this switch. Just like: "C_Cpp.defaultDatabaseLocation ": "workspaceStorage" or "C_Cpp.defaultDatabaseLocation ": "workspaceFolder"
The cpptool user can change the setting what they like. With this setting, I suppose nobody will complain the size issue. Thanks a lot :)
@vscpp We haven't added that setting yet. We open sourced our extension's typescript, so if someone wanted to add that setting it should be possible via modifying https://github.com/Microsoft/vscode-cpptools/blob/master/Extension/src/LanguageServer/client.ts and other files to change the "storagePath" based on a new setting.
@sean-mcmanus, do you have a plan for adding this setting? I cloned the source to local, but I am not familiar with typescript, I have no idea for this change. Thanks.
@vscpp, can you open a new issue for the feature request? This issue is closed so your request may get lost.
@bobbrow @sean-mcmanus , I filed a feature request, please refer to: https://github.com/Microsoft/vscode-cpptools/issues/1404