Generated formatted / indented JSON in debug mode

  1. #1

    Generated formatted / indented JSON in debug mode

    I have debug mode on ( scriptMode="Debug" ), but my /extnet/extnet-init-js/ext.axd generates one long line of JSON, which makes it close to impossible to debug in the browser (e.g. create breakpoints in Firebug or Chrome's Inspector).

    If the generated JSON could be well formatted / indented, it would ease browser debugging a lot.

    Not sure if it will help you, but there are libraries available to reformat JSON, e.g. at http://dean.edwards.name/download/#packer

    (As a workaround, is there any way for me to intercept the generated JSON and apply Dean's packer library myself?)
  2. #2
    Hi,

    You can set SourceFormatting="true" for ResourceManager
    Vladimir Shcheglov
    Sr. Developer
  3. #3
    Quote Originally Posted by vladimir View Post
    Hi,

    You can set SourceFormatting="true" for ResourceManager
    Thanks. Now I feel stupid :) And after some Googling, I finally found all the supported attributes in the "III. SAMPLE WEB.CONFIG" section of http://www.ext.net/download/README.txt

    For others, my entry in web.config is now:
    <extnet idMode="Explicit" initScriptMode="Linked" scriptMode="Debug" theme="Gray" sourceFormatting="true"  />
    Last edited by Daniil; Oct 07, 2010 at 7:33 AM. Reason: Please use [CODE] tags

Similar Threads

  1. Static JSON array in Raw mode
    By Dominik in forum 1.x Help
    Replies: 2
    Last Post: Apr 13, 2012, 12:33 PM
  2. [CLOSED] TreePanel Debug mode problem
    By asztern in forum 1.x Premium Help
    Replies: 2
    Last Post: Oct 19, 2010, 12:16 PM
  3. Replies: 1
    Last Post: Aug 11, 2010, 7:41 PM
  4. Replies: 3
    Last Post: May 11, 2010, 4:47 AM
  5. [CLOSED] intellisense and debug mode.
    By pkellner in forum 1.x Premium Help
    Replies: 6
    Last Post: Sep 29, 2008, 4:34 PM

Tags for this Thread

Posting Permissions