Has anyone had success using Visual Studio 2019 for debugging T-SQL code, the way SSMS allows Step-into & Step-over?

When I hit debug (Alt-F5), gives me this error, after making some progress. Looks like once it hits the section of the code that calls another procedure, it gives this error.

Frame not in module.  
The current stack frame was not found in a loaded module. Source cannot be shown for this location.


1  ..   
2  ..  
3  SELECT 1 FROM sys.objects  
4  SELECT dbo.SomeFunction(1)  
5  UPDATE TABLE SET X = 1 ....  

It runs well, until line 3, once it hits line 4, where it is calling a different function, it throws the aboe error. In SSMS, that line just opens a new window with code for the function and show debugging progress for each F11 step-into -- but not in Visual Studio 2019 (Version 16.7.1)


  • The debugger for T-SQL has never been the most reliable, in my experience. I'd open a bug ticket with MS. – LowlyDBA - John M Sep 3 '20 at 15:18
  • @LowlyDBA : SSMS used to be the perfect tool for SQL development. Its unfortunate that Microsoft is deprecating some features. There are some feedback tickets with Microsoft already on this issue, but this seems like a permanent move. – ToC Sep 4 '20 at 20:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.