c++ - Howto Debug CgiCC App -


I develop a Win32 C ++ CGI app for windows and linux and starts with scratches. I use CGC as IDE on Lig and Visual Studio 2010.

How can I debug it? When I institute my CGIGC class, I think CGI is waiting for the program for input and is waiting.

How can I set up an environment for my CGI input?
I have set some environmental variables such as QUERY_STRING.

Edit:
I'm almost there.

  1. During the browsing I captured traffic and wrote that content in a file.
  2. Then I redirected stdin to that file: "& lt; input.txt" line arguments in the visual studio as the debug command.
  3. I set some enterprise variables under Windows like CONTENT_LENGTH and CONTENT_TYPE

    Then I can read some material from my input:

      cgicc :: Cgicc CGI; String u = cgi ("user");   

    But when I do this, I get an exception (like reading without all the allocated memory and exceptions):

      vector & lt; Form file, allocate & lt; Formfile & gt; & Gt; Files = cgi.getFiles ();   

    Never loaded properly anyway. CGI applications receive their input through the environmental environment and standard input, so that you can easily replicate the environment for the web server CGI work.

    As far as environmental variables are a list of environmental variables that are part of the CGI protocol. I suggest that you make all of you by hand, or better, yet by capturing the environment given to a functional CGI app by a production web server. Since environmental variables are inherited from children's processes, if you set these methods in a Windows Command Prompt environment and then use the Visual Studio IDE from the same window, then these variables will be available when your CGI application The debugger will start inside and whenever you run it without debugging.

    Getting standard input replacement can be a bit more complicated in your case, because you are working with the file upload form, this includes a template that you should start with Multipart / Form-Data format. . The official document for uploading files through the form is

    I hope it helps

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -