After you've created an app, you'll want to test and run it.
If you haven't already done so in the Anatomy of an app section, create the /dev_tutorial directory structure and populate it with the Example source code.
Typically, you would download an app from SplunkBase using the Manage apps option of the App menu or create a local .spl file, where the app would be installed in the $SPLUNKBASE/etc/apps directory. For demonstration purposes and initial debugging before your app is available on SplunkBase, it is easier to manually install the app, which is what this section describes.
Packaging and Installing
Running
Debugging
The example dev_tutorial app has the following directory structure, in the $SPLUNK_HOME/etc/apps directory:

Your app is now available to run.
Note: You can also compress your app in a tarball file with a .spl extension and use the App Manager to install your app.
Run the dev_tutorial app the same way you would run any other Splunk app:
Note: Make sure your app status is enabled .
Debugging on your local machine, you can conveniently change your app code, in $SPLUNK_HOME/etc/apps/dev_tutorial, and rerun your app.
The way you restart your app depends on what code you changed. If you changed only client-side code, it is sufficient to upgrade the version number, using _bump, and re-run your app:
http://localhost:8000/en-US/_bump
Note: Make sure you clear the browser cache before re-running your app.
If you made changes to your XML files and need to reload configuration data, use debug/refresh in addition to _bump to refresh all EAI handlers that support reload:
http://localhost:8000/en-US/debug/refresh
If you changed server-side code, you need to restart Splunk and SplunkWeb:
Tip: You can specify global settings in your web.conf file, in the /default directory, that can be helpful for testing and debugging. For example, setting the JavaScript and CSS minify options. (See Admin Manual > web.conf)
You can use your favorite browser JavaScript debugger plugin, such as Firebug.
You'll notice that your JavaScript code is minified so you might want to expand it.
Note: Use console.debug("Your debug message"); to log messages to your debugger console.
On the server, you can use the built-in Python logging facilities for debugging.
import logging
logger = logging.getLogger('splunk.module.CustomResultsTable')
You can enable debug logging, as described in Enable debug logging, and use the debug logging level:
logger.debug('your debug message')
For simple printf-style debugging, you'll find it easier to use the info logging level:
logger.info('your informative message')
Informative messages are logged in the $SPLUNK_HOME/var/log/splunk/web_service.log file.
You'll find most error messages, including Python execution errors, in the log file:
$SPLUNK_HOME/var/log/splunk/web_service.log