Showing posts with label debug. Show all posts
Showing posts with label debug. Show all posts

Tuesday, April 06, 2010

Debugging SQL And The Fun Attached To That

Having come across this problem in Commerce Server 2002 recently:
Server Error in '/' Application.

Source:Microsoft OLE DB Provider for SQL ServerDescription:Incorrect syntax near '('.Source:Microsoft OLE DB Provider for SQL ServerDescription:Invalid object name 'MSCS_CatalogScratch.dbo.Catalog__Query__Results__for_spid__304'.Source:Microsoft OLE DB Provider for SQL ServerDescription:Invalid object name 'MSCS_CatalogScratch.dbo.Catalog__Query__Results__for_spid__304'.
I discovered that the stored procedure failing was called "ctlg_GetResults_for_SingleCatalog" but how to work out where?

This page came in useful: http://support.microsoft.com/kb/316549

Basically, it's stepping through SQL Stored Procedures in Visual Studio. The account you're accessing the DB requires execute permissions, etc, of course, but from there you should be able to step through the process just like code. Well, almost.

Wednesday, December 02, 2009

Debugging Tools And Fun, Erm...

Some useful links if you're trying to find web dev debug tools:
Of course, deploying your DLLs in debug mode can help your logging, but release mode is going to provide at least 4x performance improvements. If you attach a profiler for checking memory usage or performance, you can leave your .pdb files up to get more information as these contain the .NET symbols used for inspecting the code. Please don't leave them there, as they are a serious security consideration - in short, if a hacker were to copy your pdb files from your server they've effectively stolen everything but the source code:
Here's some profilers that don't involve installing Visual Studio on a live server (always a bad idea):
There are, of course, sites out there for providing information about your site:
Of course, if you're intent on debugging in Firefox (www.firefox.com, of course) you should have:
Some tools for developing your code (essentially, my favourites, as there are tonnes, Microsoft's list notwithstanding (http://msdn.microsoft.com/en-us/magazine/cc300497.aspx)):
And a list of developer must-have's:

Thursday, November 19, 2009

Dealing With Exceptions

Knowledgeable blogs on the subject of debugging, crashes, exceptions and dumps - good reading:
Grabbing the dump file and getting at the data from the dump:
Very useful links for debugging, including dump file cheat sheet and analysis check list:
Every developer's starting point when looking for debugging tools:
Page of links for Microsoft debugging tools:
WinDbg is the top one:
At time of writing this is labelled "Install 32-bit version 6.11.1.404 [16.9 MB]"

And finally, why you should use try...catch...finally, or even try...finally: