DB2 Debugging in Visual Studio 2010
IBM is offering a DB2 stored procedure debugger as part of the DB2 Add-ins for Visual Studio 2010. They claim it offers "full end to end debugging for SQL procedures for VB and C# apps”, though you will need hotfix KB2106584 from Microsoft to set break points.
This beta comes with standard ADO.NET providers for DB2 LUW, IDS, DB2 for z/OS and DB2 for IBM i. An Entity Framework provider is also included, with support for database first scenarios and canonical functions.
On the designer-side, you get a server explorer for creating/modifying databases, tables, views, etc. The stored procedure editor includes syntax highlighting. Unfortunately the on-line documentation is quite light.
The installation instructions for the database providers and add-ons show a distinct lack of professionalism. Unlike most vendors, IBM is requiring that their database providers be installed into the Global Assembly Cache. However, they cannot be bothered to offer a simple installer for this. Instead you just get a batch file. This batch file will partially fail unless it is run in a console window launched via the “Visual Studio Command Prompt”. Keep in mind that this is for the “IBM Data Server Provider”, not the add-on itself, which in turn suggests that they expect you to install Visual Studio on your test machines just to run their compiled application. Installing the add-on is another batch file, which doesn’t require the VS command prompt, but this doesn’t include the help files. To install those you must follow these steps.
Requirements for installing the IBM Database Add-Ins Help Library:
- The .msha and .mshc files must be located on the hard drive of the computer where you want to install the IBM Database Add-Ins Help Library.
- You must have administrator privileges to install help content.
- The Help Library Agent must be stopped.
If the Help Library Agent icon is displayed in the system tray, right-click the icon, and then click Exit.
- The location for storing local help content must be specified before you install the IBM Database Add-Ins Help Library.
- With Visual Studio running, click Help > Manage Help Settings.
The Set local content location page of the Help Library Manager window opens.
- If you want to override the default location for local content, browse to the directory in which you want to install help content.
Note: You specify this location only once for all help content that you install locally. After you specify the location, you cannot change it.
- Click OK, and then click Exit on the Help Library Manager main page.
To install the IBM Database Add-Ins Help Library:
- Stop the Help Library Agent if it is running. In the system tray, right-click the Help Library Agent icon, and then click Exit.
- Open a command prompt and change to the directory where you unzipped IBM.NETVSAI4.0Beta.zip.
- Run the add-ins help install batch script:
The Install Content from Disk page of the Help Library Manager window opens.
- Click the Add link to the right of IBM Database Add-Ins Help Library, and then click Update.
- On the Security Alert page, click Yes.
The Updating Local Library page shows the progress for merging indexes.
- When the Updating Local Library page shows the "Finished updating" message, click Finish, and then click Exit on the Help Library Manager main page.
Steven Ihde,Karan Parikh Mar 29, 2015