All Apps and Add-ons

When debugging a Splunk App's JavaScript in VSCode the breakpoints are moved forwards by several lines


I'm using VS Code and the "Debugger for Chrome" plugin to debug my Splunk App's Javascript code. Whenever I start a debug session the red dots that represent the breakpoints are moved several lines forwards. Using Chrome DevTools it appears that the following two lines are being injected by Splunk at the beginning of my JavaScript file:

// Translations for en_GB
i18n_register({"plural": function(n) { return n == 1 ? 0 : 1; }, "catalog": {}});

I believe that this is the reason for the breakpoints changing their location.

Is there a way to stop Splunk from injecting these two lines? If not, is there any known workaround for VS Code or other Javascript debugging tools?

Tags (1)

0 Karma
Get Updates on the Splunk Community!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...