DebugTools.tw 745 B

123456789101112131415161718192021222324252627282930
  1. :: DebugTools
  2. <input type="text" id="getVarInput"/>
  3. <<link "Get variables">>
  4. <<set _requestedVars = $('#getVarInput').val()>>
  5. <<append '.passage'>>
  6. <<include 'VarOverview'>>
  7. <</append>>
  8. <</link>>
  9. <<link 'Variable Space Usage'>>
  10. <<set _variableStorageUsage = setup.variableStorageUsage()>>
  11. <<append '.passage'>>
  12. <ol>
  13. <<for _key, _value range _variableStorageUsage>>
  14. <li>_key : _value</li>
  15. <</for>>
  16. </ol>
  17. <</append>>
  18. <</link>>
  19. <div id="varOverview"></div>
  20. :: VarOverview
  21. <ol>
  22. <<for _key, _value range State.variables>>
  23. <<if _key.match(_requestedVars)>>
  24. <li>_key : <<=JSON.stringify(_value)>></li>
  25. <</if>>
  26. <</for>>
  27. </ol>