CodeDB and VisualGDBCache folder location

Sysprogs forums Forums VisualGDB CodeDB and VisualGDBCache folder location

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #27497
    Manuel
    Participant

    Dear Sirs,

     

    I need to keep my source and configuration files seperate from all binary and intermediate files that might be created by the toolchain.

    As for version control, I am aware of the .gitignore resp. .hgignore file, however there is plenty of other reasons for such a desire.

    I was not able to figure out how to relocate the directories CodeDB and VisualGDBCache from my project directory.

    I have found this topic, but that did not help. Good to know about the SysprogsCodeDBDirectoryBase variable, but I could not figure out how to set it. Since my project is for ESP32, msbuild seems not to be an option (hence no vcxproj file), and adding a <PropertyGroup> tag to the vgdbproj file doesn’t seem to do the trick.

    Also, how to move VisualGDBCache?

    Setting the binary directory does not work quite as expected. Here is what I tried:

    $(SolutionDir)\..\bin      ->  creates bin in the same directory as the .sln file

    $(SolutionDir)\..\..\bin   ->  creates bin in the parent directory of the .sln file (as I would expect the previous line to do)

    $(SolutionDir)\bin         ->  creates "$(SolutionDir)\bin" in the same directory as the .sln file

    As for the generated file sdkconfig, I already expect having to live with it where it is, however if it can be moved to a temp or bin directory, please let me know.

    Thank you very much,

    Manuel

    PS: Am I missing another way to access documentation?

    Sometimes google gives me pages (like for example https://visualgdb.com/documentation/variables) that I do not find any link to from the Sysprogs website. It doesn’t seem to be in the tutorials or knowledge base. Is there any other index I’m missing?

    Thanks

     

    #27500
    support
    Keymaster

    Hi,

    Indeed, unlike MSBuild, where VisualGDB controls most of the build process, ESP-IDF projects are thin wrappers on top of the ESP-IDF build system. They synchronize the Solution Explorer view with the ESP-IDF project structure, however they inherit all limitations of the underlying ESP-IDF build logic, since they delegate the actual build process to it.

    Unfortunately, the $(SolutionDir) variable is not available for this type of projects, as it is designed to be built outside Visual Studio as well (with no solution in place). That said, you can simply use relative paths and other variables. Also absolute paths or parent directory paths may not work as expected due to the limitations of ESP-IDF itself. If you would like to troubleshoot it, try right-clicking on the build command line in the VisualGDB Output window (shown in cyan) and dumping it to a batch file. Then you can quickly try out several modifications of the command line, see which one is accepted by ESP-IDF, and update the VisualGDB settings accordingly.

    You can move the VisualGDBCache directory by adding the following element to the .vgdbproj/.vgdbcmake file directly under the VisualGDBSettings2 element:

    <BuildContextDirectory>[relative path to the VisualGDBCache directory]</BuildContextDirectory>

    You can change the name of the SDKConfig file via VisualGDB Project Properties -> ESP-IDF Project -> SDKConfig File (ensure you use VisualGDB 5.5 Preview 4). That said, we have not tested it outside of the default directory, so ESP-IDF might not accept it (you can troubleshot CMake issues via our CMake Debugger).

    Most of VisualGDB’s documentation is structured as various step-by-step tutorials showing various common scenarios. We also publish answers to common issues under the visualgdb.com/support/ and visualgdb.com/KB/ URLs and link them from the forum and support replies, so simply googling it should quickly reveal relevant documentation. We do not have a a comprehensive list of all possible VisualGDB windows, as they are frequently updated to reflect changes in external frameworks or feature requests from our users, and the tutorials give a good overview of the most commonly used settings. There is a page listing all global VisualGDB settings here though.

    #27590
    Manuel
    Participant

    Thank you very much for the quick and comprehensive reply.

    I was able to move  VisualGDBCache and sdkconfig out of the way. Instead of VisualGDBSettings2 you probably meant to write VisualGDBProjectSettings2, at least that’s what worked for me.

     

    However, for the CodeDB folder there seems to be no straightforward solution. It can be changed in VisualGDB settings:

    Tools->Options->Text Editor->C/C++(VisualGDB)->Indexing->Other Settings->Code Database folder name

    Unfortunately that doesn’t help because it is not part of the project settings. I will have to use .gitignore and otherwise live with it 😉
    By the way, stock Visual Studio solves that problem by keeping anything that is not source or configuration in the $(OutDir), $(IntDir) and .vs folders.

    • This reply was modified 4 years, 1 month ago by Manuel.
    • This reply was modified 4 years, 1 month ago by Manuel.
    #27596
    support
    Keymaster

    Hi,

    Good to know that moving VisualGDBCache worked. We are planning to restructure the VisualGDB’s temporary directory paths similarly to what VS does (e.g. .visualgdb\cache, .visualgdb\CodeDB, etc.) in the final VisualGDB 5.5. Based on the current estimates, we will release a preview build using the new structure in the next 2-4 weeks.

    It this won’t work, we can add a project-level setting that will allow moving the CodeDB directory by manually changing an element in the .vgdbpsettings/.vgbdproj file.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.