在 SQL Management Studio 2012 中调试 [英] Debugging in SQL Management Studio 2012

查看:45
本文介绍了在 SQL Management Studio 2012 中调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 Management Studio 2012,但无法调试任何 SQL 代码.点击调试按钮后,左侧没有任何绿色箭头,也没有任何 SQL 对象被加载到内存中.

I'm using Management Studio 2012 but I'm not able to debug any SQL code. After I hit the Debug button I'm not getting any green arrow on the left side and none of my SQL object are being loaded to the memory.

当我将光标移到我设置的断点上时,我收到此消息:当前不会命中该断点.此时无法绑定 SQL 断点.包含断点的对象未加载.

I'm getting this message when I move my cursor over the breakpoint I set: The breakpoint will not currently be hit. Unable to bind SQL breakpoint at this time. Object containing the breakpoint not loaded.

我观看了一个演示如何在 Studio 2012 中调试的 youtube 视频:http:///www.youtube.com/watch?v=_jsFM_PUPgA&feature=relmfu视频中的那个人在 4:30 左右编写了一个小的 SQL 查询,在 SELECT 中放置了一个断点,然后单击 Debug.然后他会在编辑器的左上角看到一个绿色的小箭头,他的断点也被命中了.我的不是.

I followed a youtube video demonstrating how to debug in Studio 2012: http://www.youtube.com/watch?v=_jsFM_PUPgA&feature=relmfu The guy in the video around 4:30 writes a small SQL query, puts a breakpoint in the SELECT and clicks on Debug. Then he will get a small green arrow on the top left corner of the editor and also his breakpoint is being hit. Mine isn't.

这是我想要调试的:

declare @count int = 0
while @count <> 10
begin
   select @count
   set @count = @count + 1
end

这很简单,调试应该可以工作.当然,我想稍后调试更复杂的存储过程..

It's pretty simple and the debugging should work. Of course, I would like to debug more complex stored procedures later on..

有什么建议吗?

推荐答案

我发现我正在尝试从远程机器进行调试.登录到服务器计算机并在本地进行调试.

I figured out that I was trying to debug from a remote machine. Logging into the Server Computer and debugging locally was working.

这篇关于在 SQL Management Studio 2012 中调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆