1

I have inherited an ExtJS project that uses ASP.NET Web Handlers (ashx files) to access a database.

I'm trying to debug the connection to the database which is in the C# portion of the code.

I've tried adding a break point just before the connection to my database is made, but I can't seem to get the application to stop there. They only briefly turn white during debug-execution. Hovering the mouse over the breakpoint when it's in that state shows:

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

I've been all over this question, with no better results

In the modules window, the Symbol Status of the DLL does indeed show Symbols Loaded.

The dll/pdb both seem to be copied over to C:\Users\myid\AppData\LocalTempTemporary ASP.Net Files\etc. (this seems odd, because I would expect it to attach to the .dll in my work folder) Is there a way to tell the debugger to look there instead?

There of course is no exe since this is a web app.

I've:

  • tried cleaning the solution and rebuilding fresh including a fresh pull from the repository.
  • verified the build has the "Define Debug Constant" and "Define Trace Constant" are checked
  • deleted the contents of Temporary ASP.NET
  • checked the the project was set as Debug
  • checked that "Just My Code" was disabled in Debug / General
  • restarted the workstation completely
  • checked that the Solution has the right project starting (there's only one in it)
  • checked I'm building in debug (not release)
  • made small changes to the code to force a recompile
  • checked that "Automatically determine the type of code to debug " is selected in Attach to Process
  • run as administrator
  • checked Optimize Code is not turned on in the project properties
  • checked that "Use Managed Compatibility Mode" is turned off There is no aspx involved so the CodeBehind/CodeFile issue is moot.

Beyond that, that answers are very much repetitive or I tried something at random and it worked.

What have I missed? Is there something basic that you are supposed to do with the project so it will let you debug the DLL that perhaps the original developer didn't do (no they aren't available to me)?

BIBD
  • 15,107
  • 25
  • 85
  • 137
  • maybe this can help: https://stackoverflow.com/questions/2155930/fixing-the-breakpoint-will-not-currently-be-hit-no-symbols-have-been-loaded-fo – tonymayoral May 24 '17 at 01:57
  • Possible duplicate of [Fixing "The breakpoint will not currently be hit. No symbols have been loaded for this document."](https://stackoverflow.com/questions/2155930/fixing-the-breakpoint-will-not-currently-be-hit-no-symbols-have-been-loaded-fo) – Alexandre Neukirchen May 24 '17 at 11:42
  • I've been all over that question and it's answers already. I update my question with all the things I tried. – BIBD May 24 '17 at 18:59

1 Answers1

0

Problem resolved...

Ultimately there were two issues.

Originally, the DLL had been compiled as 32bit DLL which didn't play nice with the database (Oracle 64bit). Switching the platform target should have resolved the issue except, IE's cache of the web page hid the fact that I was now getting a classic "Could not load file or assembly xxx or one of its dependencies." error. [incidentally, I've now sett he cache to clear on exit]

This error was caused by IIS Express running in the 32 bit version instead of the 64 bit version. Which means the DLL never really run, and explains the "No symbols have been loaded for this document." warning.

That was then resolved by going to Tools -> Options -> Projects and Solutions -> Web Projects and turning on Make sure that Use the 64 bit version of IIS Express for web sites and projects.

Clean and rebuild, and everything works tickety-boo

BIBD
  • 15,107
  • 25
  • 85
  • 137