调试MS SQL存储过程

dri*_*iAn 5 sql t-sql debugging stored-procedures visual-studio

我有一个问题让存储过程调试在Visual Studio 2008的工作:当我开始调试,我在输出窗口获得这些成功消息,但是实际的存储过程窗口不显示.

Auto-attach to process '[1640] [SQL] stagsql' on machine 'stagsql' succeeded.
The thread 'stagsql [67]' (0xf80) has exited with code 0 (0x0).
The thread 'stagsql [67]' (0xf80) has exited with code 0 (0x0).
The thread 'stagsql [69]' (0x908) has exited with code 0 (0x0).
The thread 'stagsql [69]' (0x908) has exited with code 0 (0x0).
The thread 'stagsql [69]' (0x908) has exited with code 0 (0x0).
The thread 'stagsql [69]' (0x908) has exited with code 0 (0x0).
Running [dbo].[uspCGetXYZ] ( @nLieferantId = 161616, @nStrukturId = -1, @nPageIndex = 1, @nPageSize = 16, @sSortColumn = arLangname, @nSortAscending = 1 ).
Run Code Online (Sandbox Code Playgroud)

Visual Studio进入"调试模式"但该过程根本没有显示.

我做的步骤:

  • 在项目设置中启用SQL调试
  • 在服务器资源管理器中打开SQL连接
  • 在连接上启用CLR/SQL调试程序
  • 右键单击该过程并选择"步入存储过程"

或者,我试图打开程序并在那里设置一个断点,但没有帮助.

有任何想法吗?如上所述,连接存在,但Visual Studio无法打开过程代码.

Way*_*yne 0

该解决方案是数据库解决方案吗?您是否转到“新建”->“解决方案”->“其他”->“数据库”?

创建数据库解决方案并设置连接首选项后,您应该能够使用服务器资源管理器来编辑并单步执行存储过程。请确认这仍然会导致问题吗?

您使用的是快捷版吗?