when debugging a Script Include in the browser, how do I get the server side scripts to show?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2015 08:21 AM
I am having a problem with the Script Include that handles the service side of an Ajax request I am making from within my app.
I remember there being a way to debug the server side code from the browser using but when I do that I don't see any of the scripts when I go to the Javascript Debugger tab (see image below)
I remember doing this with some sample tutorials and I was hoping that someone could tell me what I am getting wrong.
Thanks,
...Ed
P.S. I am using the latest version of Chrome, if that matters.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2015 01:36 PM
Hey Ed,
If you navigate to System Diagnostics you will see different types of debugging tools. More specifically it looks as though you want JS Debug, so type that in the the filter of your navigator.
Regards,
Tony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2015 02:42 PM
Hi Tony,
I'm still confused. When I navigate System Diagnostics and I do see a bunch of tools, but I don't see a way to show the scripts in the Javascript Debugger. I did try to search for JS Debug in the navigator but that did not find anything.
When I saw server side javascript being debugged, it was in that debugger window that you can get to come up in the bottom of the browser by clicking on the config gear button on the upper right and then clicking on the 'Javascript Log and Field Watcher' link at the button. This will display a view similar to what I show in my screen shot above.
Its that I don't see any scripts. Here is awiki article that shows this: http://wiki.servicenow.com/index.php?title=JavaScript_Debugger#gsc.tab=0
I just don't know why I'm not seeing any of my server side scripts here. Is there some permission I need? I know I've seen this done.
I'm very new to Service Now so sorry if I am not explaining something properly.
Any ideas why I don't see any scripts in the JS debugger.
Thanks,
...Ed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2015 05:03 PM
Hi Ed,
I don't think you are doing anything wrong. The debugger is open. You can see in a couple of places where {{variable}} replacements aren't happening. That indicates some sort of script error has occurred. When you use the regular, client-side debugging tools built into Chrome ( Chrome DevTools Overview - Google Chrome ) do you see any errors reported?
If you refresh the page, doe you still see the error?
Does it happen if you open the debugger while on a Form or List view?
You may need to contact Support by opening an Incident on Hi to get in-depth help resolving any client-side errors you see.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2015 08:00 AM
Thanks Cory,
I was able to get my script to finally show, it seems that I inadvertanly included Angular.js globally without realizing it and the version I included was later than what ServiceNow uses.
But sad to say, after I got that straightened out, I was still not able to debug using it. The app would hang when I tried to select a script. So...I'm doing more logging.
Thanks for your help.
...Ed