1

I'm working on a Sitecore module, and I cannot get symbols to load for debugging.

  1. I created a new web application project in Visual Studio; I deleted everything from it except for the module page I have, which is an aspx and aspx.cs file under /sitecore/shell/applications, so that nothing extra would get deployed to the website.
  2. I installed a brand new Sitecore 10 site using SIF
  3. I deployed my project to the new Sitecore 10 site root folder

The page loads in my new site and works, but I cannot get it to attach to the debugger I checked the project is set to Debug, and the dll and pdb are both in the site's bin. When I try to attach, it says No symbols have been loaded for this document.

1
  • Have you published the project in Debug or Release mode?
    – Marek Musielak
    Commented Aug 10, 2023 at 20:17

3 Answers 3

0

Mostly, these steps should resolve your issue.

  1. Clean the solution:
    • Right click on the solution
    • Click on Clean Solution
  2. Check the environment constants enter image description here
    • Right click on the project
    • Click on Properties
    • Click on the Build tab
    • Check the box Define DEBUG constant
    • Check the box Define TRACE constant
    • Rebuild all
  3. Select the Debug info to full enter image description here
    • Right click on the project
    • Click on Properties
    • Click on the Build tab
    • Click on Advanced
    • Select full in the dropdown Debug info
    • Rebuild all

Hope it helps!

1
0

If in case the breakpoints are not loading at all (after performing the above steps) then possible reasons can be the following. Kindly check at your end and see if anyone can help.

  • Code is NOT compiled in DEBUG mode
  • From the Build menu, select Configuration Manager, then select Debug mode.
  • DLL's is deployed to Sitecore's Webroot Bin directory however generated .PDB file of the project is not deployed to the bin. Ensure the .Dll and .PDB both files are deployed to the correct Sitecore application's bin directory.
  • You may not be attaching to the correct IIS Worker Process instance (w3wp). Find the correct application instance and attach the visual studio debugger to the application instance that runs using the deployed DLL.
  • Remove .NET Temporary Files to clear IIS Cache. Go to the following directory and delete every folder in there. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files. Restart Visual Studio, Reset IIS Application pool.
  • Clear Sitecore Cache

Hope this will help.

0

The other answers were well written so I'm not sure why they were downvoted. But besides those recommendations I find if this isn't working, check to ensure remote tools is running (with the right version) on the target machine.

0

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.