Dashboards & Visualizations

How to debug javascript app errors?

jbp4444
Path Finder

I'm working through the KV-store tutorial and hit a snag ... which brought up the bigger question: how do I debug the calls being made from the Javascript UI to Splunk server?

In my case, I issue a 'service.del(...)' call against a KV-store, and the browser is showing no errors and refreshes the display -- but the key is never deleted.

(http://dev.splunk.com/view/SP-CAAAEZT ... on "step 5" of that tutorial ... I'm less concerned about my specific error and really asking how do you debug this in general)

( this is splunk-free running locally on a Mac, localhost:8000 connection so it isn't a network connectivity issue )

Tags (1)
0 Karma
1 Solution

jbp4444
Path Finder

Now the problem is gone ... I did add an error handler to the service.del call (similar to what @poete recommended) but that error handler isn't called ... and the delete operation is working.

View solution in original post

0 Karma

jbp4444
Path Finder

Now the problem is gone ... I did add an error handler to the service.del call (similar to what @poete recommended) but that error handler isn't called ... and the delete operation is working.

0 Karma

poete
Builder

Hello @jbp4444,

I would start using the usual log display in the console (console.log(something).

If you open the console (F12 key for chrome), you will be able to see the output, and from there, debug your javascript code.

0 Karma
Get Updates on the Splunk Community!

Aligning Observability Costs with Business Value: Practical Strategies

 Join us for an engaging Tech Talk on Aligning Observability Costs with Business Value: Practical ...

Mastering Data Pipelines: Unlocking Value with Splunk

 In today's AI-driven world, organizations must balance the challenges of managing the explosion of data with ...

Splunk Up Your Game: Why It's Time to Embrace Python 3.9+ and OpenSSL 3.0

Did you know that for Splunk Enterprise 9.4, Python 3.9 is the default interpreter? This shift is not just a ...