Bookcold

导航

VS2010 查看Linq生成的Sql语句

在vs2008中,伟大的ScottGu提供了这个小工具,供我们调试linq to sql生成的语句。在vs2010中,这个工具不好使了。搜了半天,找到了个能在vs2010下使用的小工具!

下载地址:http://www.rajavenkatesh.com/projects.aspx

安装方法:

1。 关闭vs2010,将其dll拷贝至Program Files\Microsoft Visual Studio 9.0\Common7\Packages\Debugger\Visualizers 目录

2。 右键选中该dll的属性,在弹出的对话框中,选择unblock该dll;否则,在无法在vs中使用

3。 在Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.config 增加语句:<loadFromRemoteSources enabled="true"/>

使用方法:

在需要查看linq语句的地方设置断点:

image

点击该菜单后,就弹出了查看sql的对话框:

image

有任何问题,可以去这里提问,该工具的作者都会回答的!

Note: Cross posted from Bookcold's Blog.
Permalink

posted on 2010-08-26 12:42  bookcold  阅读(1538)  评论(0)    收藏  举报