Quote Originally Posted by jpbro View Post
I've just updated the VbFcgi GitHub repository with the new VbFcgiLib.CSimulator class. It is in an early state right now, but there is a SimulateRequest method that takes a URL and a reference to your IFcgiApp implementing class. It then builds FCGI request and response objects for passing to your IFcgiApp_ProcessRequest method, meaning you can now step through your app in the IDE.

To do this:

In a standard module in your FCGI application project, add some code like this:

Code:
Public Sub TestApp()
   Dim lo_MyApp As New CFcgiApp   ' Create an instance of your FCGI application
   Dim lo_Simulator As New VbFcgiLib.CSimulator   ' Create an instance of the simulator class

   ' Change the URL below to whatever URL you want to test
   lo_Simulator.SimulateRequest "http://localhost/myapp.fcgi?query1=value1;query2=value2", lo_MyApp
End Sub
Make sure to put a breakpoint (or Debug.Assert False) in your IFcgiApp_ProcessRequest method so that you can step through the code after calling TestApp in the Immediate window.

NOTE #1 - The simulator has only been lightly tested, so there are probably bugs. Please let me know if you run into any trouble!

NOTE #2 - The simulator does not currently support POST requests with HTTP body content.
Hi jpbro, I tested the CSimulator carefully and it worked very well. It is very convenient to use the CSimulator to debug the vbFcgiLib and vbFcgiApp code in the VB6 IDE. Now all the query parameters (including "imagebyindex" and "showparams") are working properly. I like FastCGI more and more, it's really a great product. Thank you so much.