Supressing Model-Glue Debugging 1

Posted by Neil on November 29, 2007

Every now and then you may find yourself doing AJAX requests in a model-glue application.  One of the parts of this is a page that returns a lump of JSON encoded data.

Now, imagine you are doing this in development and you may have the model-glue debugging turned on.  if you do, the browser won’t understand the JSON data due to all the MG debugging junk appended on the end of the page.

So, how do you get round that issue apart from turning off debugging in your config and running it again (a bit of a pain)?

Well, simply set request.modelGlueSuppressDebugging to true and you’re rockin’.

Trackbacks

Use this link to trackback from your own site.

Comments

Leave a response

  1. James Allen Thu, 29 Nov 2007 15:24:17 EST

    Nice one Neil!

    I haven’t got to the point of running Ajax code via MG yet, so this will avoid the inevitable frustration of JS errors and non-working Ajax when I do..

    Great tip.

Comments