debug UI Action script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2016 02:52 AM
Hi , Is it possible to check what is wrong in Ui script ,Is there anyway to debug it or any command which write the details ( incorrect command ) in javascript log

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2016 04:22 PM
Great stuff listed above (especially for client side UI actions.)
I'd also throw out there that, if your (server side) UI action is anything more than a couple lines, consider using a Script Include to make a function/method and call it from the UI action. This makes testing, debugging and maintenance much easier. For example:
var ms = new MyStuff();
var result = ms.doSomething(current, gs.getUserID());
if (result) {
gs.addInfoMessage('Thank you');
action.setRedirectURL(current);
} else {
gs.addErrorMessage('Something went wrong.');
}
Now you can put your real work in the doSomething() function, add all the debugging you like. If you're in the global scope, you might want to take a look at the Debugging Tools Best Practices page. If you're using a scoped app, then I recommend becoming familiar logging.verbosity and logging.destination properties.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2016 12:59 AM
Hi Mr. Tomasi,
Do you know something about what happened with the "Developer Console" available in Eureka, which makes us able to debug, pause and evaluate most of the Synchronous server side scripts?
It costs me a lot to be learn how to explode it, but, after upgrade to Geneva, I can't find this! (And sometimes is really necessary, specially with incidents and race conditions in strange automations Client-then-Server-side UI Actions firing events, or some asynchronous automations affecting synchronous conditions and so on).
Regards

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2016 03:55 AM
Hi German,
Like you, I miss the embedded debugger. You are correct, it is not available in Geneva. There were several problems discovered. R&D made a tough decision to remove it and invest the time working on a newer better one. They tell me it's coming in an upcoming release (sadly, not Helsinki.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2016 05:34 AM
Hi Chuck
You seem to be sending me everyone's replies except my own!
David
David Parsons
CMDB Manager
Information Technology
T: 020 7935 4444 | x3483
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2016 05:40 AM
Hi Chuck,
Thank you for this clear explanation.
I hope it will come back soon!
Also, I'm waiting for the webcast series about AngularJS in ServiceNow, many of us learned Jelly using your Webcasts!
Best Regards