1
0

DebugTools.tw 818 B

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