vrijdag 5 september 2008

Simple debugging ASP.NET with Delphi

Of course there are better ways to debug your asp.net application. But sometimes you just want something simple.

You can raise exceptions from your code. This way you can find out if some code is executed. You will see the familiar exception message in your browser.

raise Exception.Create('from GetPasswordFromDB');

You can even use this to inspect some variables.

raise Exception.Create('from GetPasswordFromDB, commandtext='+cmd.CommandText);

You may find this trick useful if you are trying to debug some of the dll's that come with Delphi, like Borland.Web.Provider.dll.

Stay tuned for a blog about making your own version of Borland.Web.Provider.dll.

Geen opmerkingen: