sql - 调试 MS SQL 存储过程

标签 sql visual-studio tsql debugging stored-procedures

我在 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 ).

Visual Studio 进入“ Debug模式”,但该过程根本不显示。

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

  • 或者,我尝试打开程序并在那里设置断点,但没有帮助。

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

    最佳答案

    无论如何,您是否选择了“ 显示实际执行计划”?我发现如果你点击了那个按钮,调试就不会运行,尽管我一生都无法弄清楚为什么会这样。

    我还没有在 Connect 上提交错误,但如果有人知道,我很乐意为一个错误点赞。

    关于sql - 调试 MS SQL 存储过程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/824447/

    相关文章:

    php - 在 MySQL 查询中使用 now() 函数

    visual-studio - 您知道Visual Studio的任何文件比较加载项吗

    c++ - 我在笔记本电脑上找不到文件夹 C :\Program Files (x86)\Microsoft Visual Studio 14. 0\VC\include\gl。我该如何添加它?

    sql-server - 在sql server中转换为ASCII字符

    mysql - 使用 2 个表的结果来获取第 3 个表的信息

    c# - 使用 Linq 执行 SQL 函数

    MySQL - 按 GROUP_CONCAT 分组

    c++ - 为什么 std::remove 采用 const 版本的迭代器?

    sql - 字符串或二进制数据将被截断 - 大字符串

    sql-server - 乘以 numeric(32,9) 列时的 SQL Server 精度/小数位数