Book a Demo

Author Topic: Dump variable  (Read 3435 times)

survex

  • EA User
  • **
  • Posts: 76
  • Karma: +1/-1
    • View Profile
Dump variable
« on: January 13, 2015, 01:36:07 am »
I'm working with EA under wine, so my debbuging tool is not working. I'm developing scripts with JScript.

Is there any way to dump variable?

like:

var elem;
elem.name = "Mike"
elem.age = 25;

Session.Output(dump(elem));
// {name: "Mike", age: 25}

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Dump variable
« Reply #1 on: January 13, 2015, 06:20:03 pm »
I guess that's more of a JScript question then an EA question, but a quick google search seems to indicate that there is no built-in function like that in JScript. (see http://stackoverflow.com/questions/749266/object-dump-javascript)
I guess the fastest solution might be  to write your own dump() function.

Geert
« Last Edit: January 13, 2015, 06:20:32 pm by Geert.Bellekens »