I have a C# DLL (assembly) that is used by an ASP.NET application.
When a developer using this component is running the ASP.NET app in
debug mode on their local machine, I want code in my C# DLL to be able
to set breakpoints in VS.NET. The source code of my DLL is not
available to the developer. The breakpoint needs to show up at the
next line of the developer's source code and the debugger needs to
break there. The breakpoint is set only if dynamic conditions are true
and the breakpoint could be anywhere in the developer's code. (I am
open to any solution, but the obvious one is to write an Add-in, have
the Addin call applicationObject.Debugger.Break(), Debugger.StepOver,
etc. as required by my logic. The problem in that approach is how to
establish communication between the ASP.NET app which contains my
component, the Add-in, and the IDE which is running as a desktop app.)
The answer I am looking for consists of an explanation using C# of how
I can have my component in an ASP.NET app (running in VS.NET debug
mode) set a breakpoint so that the VS.NET debugger will stop at that
breakpoint. I'll pay a bonus if someone provides a fully working
solution in C#. Otherwise, I just expect enough answers to be able to
write my own code. Thanks! |