Debugging SQL Server on Linux from remote VS 2022 pc

Torsten Kiltz 0 Reputation points
2024-05-28T18:57:39.8333333+00:00

Is it possible to debug an SQL-Server on an Ubuntu 22 machine from Visual Studio 2022? I can reach the server an can execute queries from within VS2022. But debugging fails with no useful message (error 80004005). Firewall on the server pc is inactive.

If debugging is possible what measures have to be taken to be successful?

Thanks, Torsten

SQL Server | Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
    2024-05-28T21:19:13.94+00:00

    PRINT and SELECT is what I have used for debugging SQL Server for the last twenty years. I found that using the debugger came with too much red tape, that it was just a hassle to use.

    1 person found this answer helpful.
    0 comments No comments

  2. MikeyQiaoMSFT-0444 3,300 Reputation points
    2024-05-29T09:30:30.0633333+00:00

    Hi,Torsten Kiltz

    Welcome to the SQL Server Q&A Forum!

    The latest Microsoft official documentation does not provide a method for remote debugging of SQL Server on Linux, and neither the T-SQL debugger nor the SSDT tools are capable of accomplishing this due to the Linux operating system.

    Refer to https://github.com/microsoft/mssql-docker/issues/410

    As Erland mentioned, PRINT and SELECT are indeed good manual methods for debugging SQL statements.

    Alternatively, you could try migrating the database to a Windows environment for debugging purposes.

    Best Regards,

    Mikey Qiao


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.