Also, if you're using Firefox, the Firebug extension is quite handy for
viewing requests and seeing what exactly was POSTED to a given page.

There are two more extensions that are good in this regard, HttpFox and TamperData.


I've never tried this with Active4D, but I'm wondering if it would be possible to write an Active4D debug routine that would insert inline Javascript that would wrap Firebug console.log statements? This might allow you to dump debug statements to the browser console instead of Active4D's console. Since we run the web server on Client, I have to observe A4D's console via Timbuktu.

If you're using fusebox, put this at the bottom of your main layout, just before the </body> tag:


  <%
        if (<>A4D_BrowserConsoleOn)
                if (length(_request{"console.log"}) > 0)
write("<script type=\"text/javascript\">console.log('%s')</script>" % (replace string(_request{"console.log"}; "'"; "\\'")))
                end if
        end if
  %>


In the 4D method A4D_Init, add this code just before the call to A4D Init:

C_BOOLEAN(<>A4D_BrowserConsoleOn)
<>A4D_BrowserConsoleOn:=True

Then you can put code anywhere you want to write to the Firebug console. You could put something in the On Execute Start event handler to dump form variables:

if (<>A4D_BrowserConsoleOn)
   _request{"console.log"} := <code to dump form variables>
end if

Note that if you want to have multiple lines within a single console line, you need to put \\n in your Active4D string.

Regards,

   Aparajita
   www.aparajitaworld.com

   "If you dare to fail, you are bound to succeed."
   - Sri Chinmoy   |   www.srichinmoy.org


_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to