New Horizons Get Schooled Blog

Don’t let fancy CLR debugging slow you down

There are a number of tools you can use for debugging CLR integration code in Visual Studio, such as the test.sql page and a special CLR debugger. Unfortunately, each new tool comes with its own quirks and setup headaches. Our recommendation is to avoid using these fancy tools unless you need to troubleshoot why something that works in Visual Studio doesn’t work when you deploy it to SQL Server.

Instead of relying on complex debugging setups, write your modules and classes in a regular project in Visual Studio and debug them there. Make sure your SQL Server stored procedures and functions are very simple; they only need to be a few lines. In those lines, you can call procedures in your modules and classes, where you do the serious work. Architecting your code this way makes code reuse much easier—as well as keeping you from having to debug more tools just to debug your code.

Posted on 7/9/10 7:49 AM by Get Schooled in CLR debugger, in debugging CLR, in Microsoft, in Visual Studio, in test.sql, in Tips & Tricks

Get Schooled

Written by Get Schooled

Search by Topic

    Lists by Topic

    see all

    Be at the center of it all.


    Knowledge Ninjas

    a web-based service that allows software application end users to access a subject matter expert in real-time via a chat interface to resolve questions or problems they encounter in their specific software.