Visual Studio | No source code available for the current location

Visual Studio 2005 / 2008

Whilst trying to debug a Stored Procedure, the following error prompted:

There is no source code available for the current location

First you have to make sure that the current user is part of the ‘sysadmin’ Server role (click here for how to).

  • Next go to Visual Studio
  • Load the server explorer (CTRL+ALT+S)
  • Right Click on the database where the stored procedure is found
  • Click ‘Allow SQL/CLR Debugging’
  • Close Visual Studio and Start it again

You should now be able to debug Stored Procedures from Visual Studio.

PS. To Debug an SP, right click on it, and select ‘Step Into Stored Procedure’.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s