Slow execution of -file-list-exec-source-files

If you often see that the -file-list-exec-source-files command takes too long time to run, this happens because you are debugging a very large project with lots of source files. VisualGDB uses this command to get a list of all source files from the GDB debugger to better handle file name resolution and detect common problems. You can reduce the time spent on the -file-list-exec-source-files command via one of the following methods:

  • Update to VisualGDB 4.2. We have optimized the handling of this command there.
  • In VisualGDB Project Properties, GDB Settings tab, set the 'Use relative source file paths' flag:

    Note that this will prevent VisualGDB from auto-detecting and fixing invalid/incomplete path mappings.
  • Disable the command for Android projects globally via Android->Debug Options->Do not Query Source Files
  • If your project contains lots of static libraries, consider removing the debug symbols from most of them before linking the project. This is done by running the following command:
    strip <library name>
    The strip.exe tool is usually located in the same directory as gcc.exe and gdb.exe
    Only keep the symbols for the libraries you want to step through. This will reduce the amount of debug information in your binary and will speed up the -file-list-exec-source-files command. However you won't be able to set breakpoints inside the code of those libraries until you rebuild your application without stripping them.