locked
Can't hit breakpoint in .ashx file RRS feed

  • Question

  • User597034303 posted

    I am having breakpoint troubles.  I launch VS2012 launched 'As Administrator' and add an "Existing Website".   This website contains nothing more than a single C# ASP.Net generic handler .ashx text file and an all-but-empty web.config file.  That's it.  No compiled code whatsoever.  I set this .ashx file as the startup page in Visual Studio.  Then I set a breakpoint in the ProcessRequest() method and start the website from within VS.  Next I launch an external client and access my client.  I can tell the code in the .ashx file has run successfully but my breakpoint never gets hit.  When I look back at my Visual Studio solution I can see my breakpoint has been disabled with the message: "breakpoint could not be hit ... symbols could not be loaded".   What symbols?   I must be missing a step. 

    Can someone enlighten me as to how I can hit my breakpoint in my generic ASP.Net handler?

    Thanks,

    Bill

    Friday, August 23, 2013 5:42 PM

Answers

  • User100899815 posted

    Make sure you have the debug flag set to true inside your web.config. When you press F5 or when you click on the play button, you will see a dialog that says debugging Not enabled with two radio buttons. Click the one that says modify the web.config file to enable debugging and then click okay. Or you can just add it manually ....

    <?xml version="1.0"?>
    <!--
      For more information on how to configure your ASP.NET application, please visit
      http://go.microsoft.com/fwlink/?LinkId=169433
      -->
    <configuration>
      <system.web>
        <compilation debug="true" targetFramework="4.0"/>
      </system.web>
    </configuration>

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, August 25, 2013 12:27 AM

All replies

  • User100899815 posted

    Make sure you have the debug flag set to true inside your web.config. When you press F5 or when you click on the play button, you will see a dialog that says debugging Not enabled with two radio buttons. Click the one that says modify the web.config file to enable debugging and then click okay. Or you can just add it manually ....

    <?xml version="1.0"?>
    <!--
      For more information on how to configure your ASP.NET application, please visit
      http://go.microsoft.com/fwlink/?LinkId=169433
      -->
    <configuration>
      <system.web>
        <compilation debug="true" targetFramework="4.0"/>
      </system.web>
    </configuration>

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, August 25, 2013 12:27 AM
  • User597034303 posted

    Thanks!  I was never prompted with the dialog containing the radio buttons, so I make the entry to web.config manually.  Once I restarted everything (seemingly a required step), my breakpoint started getting hit. 

    Thanks Again,

    Bill

    Monday, August 26, 2013 12:47 PM