# How to test a scripted module

**URL:** <https://discourse.slicer.org/t/how-to-test-a-scripted-module/4578>\
**Category:** Support\
**Tags:** module, scripted\
**Created:** [October 29, 2018, 8:57pm UTC](https://discourse.slicer.org/t/how-to-test-a-scripted-module/4578 "2018-10-29T20:57:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kayarre](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kayarre/32/3606_2.png) [@kayarre](https://discourse.slicer.org/u/kayarre)\
**Post date:** [October 29, 2018, 8:57pm UTC](https://discourse.slicer.org/t/how-to-test-a-scripted-module/4578/1 "2018-10-29T20:57:53Z")

</div>

I modified the SlicerCaseIterator module, but I don’t actually know how to test/debug it.

the command i use is `~/tools/Slicer-4.10.0-linux-amd64/Slicer --additional-module-paths ~/build/slicer/SlicerCaseIterator/SlicerCaseIterator`

but it fails to load which means there is an error, but I am not sure how get the errors to show up.  
is there a better way beyond adding the `--launcher-verbose` option?

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [November 26, 2018, 6:58pm UTC](https://discourse.slicer.org/t/how-to-test-a-scripted-module/4578/2 "2018-11-26T18:58:37Z")

</div>

Any script errors on startup show up in the terminal and in the python console. Also if you start with a working module (like unmodified SlicerCaseIterator) and you enable developer mode (in the preferences dialog) then you can incrementally reload and debug the script.
