I got it to run, but some things were tricky. This is what it took for me:
1. Opened VS 2005.
2. Chose File - New Web Site - ASP.NET Web Site.
3. Created it in the file system using C# at C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\MyWebProjectName. Added said TextBox1, Label1, and Button1 per instructions above. Added code shown above.
4. Right-clicked the project in Solution Explorer, chose Property Pages from the popup menu.
5. Clicked References, added a reference to Microsoft (r) SharePoint (r) Services.
6. Clicked Start Options, set Server to 'Use custom server', set base URL to 'http://LocalServer:PortNum/_layouts', set start actions to 'Don't open a page'.
7. Closed Property Pages window.
8. Opened the Web.config file, commented out the <authentication mode="Windows"/> tag, added the tag <customErrors mode="Off"/> immediately below it.
9. Clicked Build - Build Web Site.
10. Set some breakpoints, clicked Debug - Attach to Process, selected the instance of w3wp.exe that corresponds to my application pool. (If no w3wp.exe exists in the list, you'll need to navigate to http://LocalServer:PortNum/ first.) Clicked Attach.
11. Navigated to http://LocalServer:PortNum/_layouts/MyWebProjectName/Default.aspx, entered a name of MyDomain\SomeSharePointUser into TextBox1, clicked Button1.
12. Continued through breakpoints. Observed output.