Can I turn off indexing in the debugger of VS2022?

László Szerémi 35 Reputation points
2023-08-26T14:45:44.12+00:00

I have kind of a weird setup for developing in D. Due to the lack of dub (D's standard build tool, which makes a lot of things simpler) support in the official D language plugin for Visual Studio, I have to instead use VSCode as an editor, build it in command line, then open the executable in an empty C++ project.

This worked fine up until the most recent update of 2022. I previously had issues with losing the option to catch D exceptions handled by the code, now I have a problem with Visual Studio on a breakpoint starting to index debug symbols, which result in the executable of Visual Studio outgrowing my system resources and crashing Windows.

Can I turn it off somehow? Alternatively, I can also accept guides on setting up WinDbg for debugging apps I'm developing (most guides I can find are on using it for reverse engineering programs without the source code, and I can't get it to open .pdb files for my D programs).

Developer technologies | Visual Studio | Debugging
Developer technologies | Visual Studio | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Syed Shah Hussain Bukhari 140 Reputation points
    2023-08-27T01:01:14.8266667+00:00
    1. Open Visual Studio and go to the "Tools" menu.
    2. Select "Options" to open the options dialog.
    3. In the dialog, expand the "Debugging" tab and select "Symbols".
    4. In the "Symbols" settings, you can either uncheck the "Microsoft Symbol Server" option or click on "Only specified modules" and add the specific modules you want to load symbols for.
    5. Click "OK" to save the changes.

    By disabling or limiting the symbol loading, Visual Studio will consume fewer system resources while debugging your D programs.

    As for setting up WinDbg for debugging your D programs, you might need to configure it to load the .pdb symbol files generated during the build process. Here's a guide to help you get started:

    1. Install WinDbg if you haven't already. You can download it from the official Microsoft website.
    2. Open WinDbg and go to the "File" menu.
    3. Select "Open Executable" and navigate to the location of your D program's executable file.
    4. After opening the executable, go to the "File" menu again and select "Symbol File Path".
    5. Specify the path to the folder containing the .pdb files for your D program.
    6. Click "OK" to save the symbol file path.

    By configuring WinDbg to load the .pdb symbol files, you should be able to debug your D programs effectively.

    I hope these suggestions help resolve your issues with the Visual Studio plugin and WinDbg. If you have any further questions or need additional assistance, please let me know.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.