Recently, Chris Edwards and I were creating some Visual Studio 2005 based SharePoint 2007 Workflows that used ASPX forms instead of InfoPath Forms. The use of InfoPath Forms wasn’t an option for the client since MOSS Standard Edition was being used. So, we dug in to create the ASPX Forms (look for future posts on these efforts).
The debugging of the ASPX forms can be a bit tricky without some knowledge of the errors in the page. Yes, simply using a command prompt and the SharePoint logs can help. For example using "find" command to search for occurrences of "Workflow" in the logs like this

(remember to cd to c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS to run the command)
to get results similar to

…but, the logs are a bit cumbersome and aren't always the most useful when the error is generated from an ASPX page. Using a log reader can provide a more efficient means of searching the logs, but this still may not identify the root cause of the problem you're trying to solve.
ASP.NET Tracing comes to the rescue. To enable tracing of ASPX page in the browser perform the following steps.
1. Open c:\ inetpub\wwwroot\wss\VitualDirectories\<port>\web.config in your favorite text editor.

2. Edit the web.config value for AllowPageLevelTrace tracing to true and CallStack to true
3. Add the following to web.config under the system.web element (this element is not present by default).

Now, when you encounter an error in your ASPX page, for example when developing a custom ASPX Workflow Association or an ASPX Custom Task edit form, page level tracing will provide details to help you become happy much faster.
You'll not only get a more useful and informative message than the "Error has occurred" message, but scrolling down the page will give you detail about the call tracing, the control tree for the page executing, HTTP header and server variable information as well.
NOTE: These steps should only be performed in the development or staging environment.
Happy Hunting!