CSML updates
CSML updates

New debug keyword





You can now use the new debug action verb in all your bots to help with development. This keyword will output a message that is only visible in the test webapp (it is never shown in production channels) and will output a simplified version of deep objects to make sure that its structure is always shown, even if the data is very large.

do mylargeobj = { 
  "val": 1,
  "something": {"toto": "tutu" },
  "other": "hello",
  "onemore": [1, 2, 3]
debug mylargeobj


Moreover, in contrary to the say keyword, debug can also be used inside native CSML functions to print temporary variables and further help chatbot developers.

fn is_triple_even(num):
  do triple = num * 3
  debug triple
  return (triple % 2)