Hi jhg-5209,
Actually, since VS2017, VS supports to debug the stored produce directly in VS.
If I understand this issue correctly, you can create a sq database project directly in VS2019 and then follow the steps below:
1) first connect to your current database under View--> SQL Server Object Explorer and make sure that VS successfully established a connection with your database.
2) right-click on the sql database project--->right-click on the project Properties-->set Target Platform to SQL2019. After that, create a new item called Stored Proceduce and put your stored proceduce into that file.
Note that the stored produce cannot set a breakpoint and you should use exec command to invoke that procedure and set a breakpoint there.
Add the command under the sql file:
Exec [dbo].[xxx](the procedure)
3) When you finish it, first click Build to build the project to generate the pdb file and then click SQL top menu-->Execute with Debugger to debug the procedure.
You can also refer to this document about how to: Debug Stored Procedures in VS.
Besides,
this is about how to debug a database project directly in VS and it is officially recommended and if you used other ways and had other distinctive details, please let us know. If I misunderstand your issue, please let us how you wish to debug such procedure in VS and give us any detailed info to help us understand your issue.
Best Regards,
Dylan