11

I want to debug my code running in a Sitecore CM Docker container. When I attach my debugger, it never breaks at my breakpoints and hovering over them always says

The breakpoint will not currently be hit. No symbols have been loaded for this document.

Why won't it attach properly?

How I attach to process

  1. Open the Containers window (View menu -> Other Windows -> Containers)

  2. Right-click on my CM container and click Attach to Process

    Containers window with attach to process menu item

  3. Select w3wp.exe and click Attach

    Attach to process window

  4. Mouse over my breakpoint and see "The breakpoint will not currently be hit. No symbols have been loaded for this document."

What else I've tried

  1. Ensuring I have the DEBUG constant defined and Full debugging information enabled on my project for my build configuration
  2. Rebuilding the solution
  3. Verifying that the *.pdb files have been deployed to the container's bin directory

1 Answer 1

22

You need to set the code type to Managed (.NET 4.x) code in the Attach to: section of the Attach to Process dialog in order for debugging to work. Automatic does not load symbols.

Attach to process dialog with Managed (.NET 4.x) code type selected

1
  • 1
    I've been stuck for two hours on this. I just started using VS 2022 and this was the solution. Thank you, thank you, thank you.
    – Bob Horn
    Commented May 24, 2022 at 15:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.