Unable to debug into the Cobol SQL CLR stored procedure



When trying to debug into the Cobol SQL CLR stored procedure, you may get the errors below:

1. Get error "Unable to debug .NET code. Could not attach to SQL Server process on xxx".

2. The debugger just steps over the EXEC SQL CALL statement, you cannot step into the stored procedure.


For the first error, you need to run Visual Cobol for Visual Studio as administrator.

For the second issue, please double check the following:

1. The Calling program's project property, debug tab, the Enable SQL Server debugging option is set.

2. In Visual Studio SQL Server Object Explorer, right click the SQL Server instance, and ensure that the Allow SQL/CLR Debugging option is checked.

3. If you have rebuilt the SQL Server Database Project, you need to re-Publish the stored procedure to SQL Server before starting debugging.

Please check Tutorials: SQL Server COBOL Stored Procedures in our documentation for step by step procedure on how to work with Cobol SQL CLR stored procedures.


Comment List
Related Discussions