How do you debug MySQL stored procedures?

后端 未结 16 1241
旧时难觅i
旧时难觅i 2020-11-30 17:44

My current process for debugging stored procedures is very simple. I create a table called \"debug\" where I insert variable values from the stored procedure as it runs. Thi

16条回答
  •  情深已故
    2020-11-30 18:01

    MySQL Connector/Net 6.6 has a feature to Debug Stored Procedures and Functions

    Installing the Debugger

    To enable the stored procedure debugger:

    • For Connector/Net 6.6: Install Connector/Net 6.6 and choose the Complete option.
    • For Connector/Net 6.7 and later: Install the product MySQL for Visual Studio, to which the stored procedure debugger belongs.

    Starting the Debugger

    To start the debugger, follow these steps:

    • Choose a connection in the Visual Studio Server Explorer.
    • Expand the Stored Procedures folder. Only stored procedures can be debugged directly. To debug a user-defined function, create a stored
      procedure that calls the function.
    • Click on a stored procedure node, then right-click and from the context menu choose Debug Routine.

提交回复
热议问题