Attaching the Debugger only in Debug
I noticed an article on the Infinite Codex blog that demonstrates how to debug CLR Stored Procedures. The example uses a #if
preprocessor directive to compile the debugging code only if the DEBUG
symbol is defined. Personally, I find using the #if
directive makes your code look rather ugly, and accidentally including code inside the directive that you did not intend to becomes a real possibility. My preferred solution is to use the ConditionalAttribute
to refactor such code out into a separate method.
autofac (26)
web-services (23)
wscf (15)
links (10)
mvc (6)
tools (6)
c# (5)
blogengine-net (5)
resharper (5)
sql-server (4)
rest (4)
windows (3)
httpclient (3)
windows-live-writer (3)
visual-studio (2)
tfs (2)
silverlight (2)
velocity (2)
service-fabric (1)
net-core (1)
asp-net (1)
dnx (1)
web-api (1)
linq (1)
mongodb (1)
wmi (1)
codedom (1)
nunit (1)
reflector (1)
-net-framework (1)
lightspeed (1)
sqlite (1)
-net-ria-services (1)
feedburner (1)
jquery (1)