No dlls are visible when I run the VS debugger. No breakpoints are available

Michael Warden 0 Reputation points
2024-07-03T23:16:48.4466667+00:00

I have an HTTP API project that was originally built in VS 2019 and has been migrated to VS 2022. When I run the project with the debugger in Visual Studio, no dlls are listed in the module window and the breakpoints are all open circles.

If I deploy the project to my drive and try to attach to it, I can see the modules just fine.

I've gone through many of the previous posts and looked at their solutions. Made sure all the right options were selected. I've set the build option to debug and not release. Cleaned and rebuilt the solution, but no luck.

Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
1,005 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Tianyu Sun-MSFT 31,406 Reputation points Microsoft Vendor
    2024-07-04T07:40:18.4866667+00:00

    Hi @Michael Warden,

    If you try to create and test in a newly created HTTP API project in VS 2022, will the same issue appear?

    Cleaned and rebuilt the solution

    Did you also remove the bin, obj and the hidden .vs folder in your solution/project folder?

    BTW, have you checked this document: Troubleshoot Breakpoints in the Visual Studio Debugger


    Update1:

    Since the issue disappeared after you cleaned the bin, obj folders, I guess it's due to the symbol files mismatch.

    Besides, as some debugging information is saved in the .vs folder, sometimes removing the hidden .vs folder is also important.

    Anyway, happy to hear that this issue doesn't block you anymore.

    Happy coding,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

  2. Pinaki Ghatak 4,690 Reputation points Microsoft Employee
    2024-07-04T13:55:47.5933333+00:00

    Hello @Michael Warden

    It seems you are not using the debug information and might be doing a release build.

    Here are a few suggestions that might help:

    1. Check Debugging Information: Make sure that the debugging information for your project is activated. You can do this by right-clicking on your project, selecting Properties, then Configuration properties -> Linker -> Debugging. Switch “Generate Debug Info” from No to Yes
    2. Check Debug Information Format: Ensure that C/C++ > General > Debug Information Format is set to Program Database for Edit And Continue (/ZI) or something similar.
    3. Check Project Compilation: Make sure all your project and files in your solution are set to compile as Debug and not Release or something else
    4. Clean and Rebuild Solution: Try to clean and rebuild your solution. If it fails, exit Visual Studio and remove the hidden .vs folder
    5. Reset Settings: If none of the above work, you might want to reset all your debug-related options (Tools -> Import and Export settings -> Reset all settings ->No, just reset…) or use the command devenv /ResetSettings

    This should address your mentioned problem.


    I hope that this response has addressed your query and helped you overcome your challenges. If so, please mark this response as Answered. This will not only acknowledge our efforts, but also assist other community members who may be looking for similar solutions.


  3. Michael Warden 0 Reputation points
    2024-07-05T16:00:24.3466667+00:00

    Tianyu Sun-MSFT had the answer. I'm not sure why the bin and obj folders are not cleaned out when a Clean Solution is run but manually cleaning them and building corrected this for me.


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.