<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.slicer.org/w/index.php?action=history&amp;feed=atom&amp;title=Documentation%2F4.6%2FExtensions%2FDebuggingTools</id>
	<title>Documentation/4.6/Extensions/DebuggingTools - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.slicer.org/w/index.php?action=history&amp;feed=atom&amp;title=Documentation%2F4.6%2FExtensions%2FDebuggingTools"/>
	<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/4.6/Extensions/DebuggingTools&amp;action=history"/>
	<updated>2026-04-07T04:02:18Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Documentation/4.6/Extensions/DebuggingTools&amp;diff=47699&amp;oldid=prev</id>
		<title>UpdateBot: Nightly -&gt; 4.6</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Documentation/4.6/Extensions/DebuggingTools&amp;diff=47699&amp;oldid=prev"/>
		<updated>2016-11-07T07:13:13Z</updated>

		<summary type="html">&lt;p&gt;Nightly -&amp;gt; 4.6&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;noinclude&amp;gt;{{documentation/versioncheck}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------- --&amp;gt;&lt;br /&gt;
{{documentation/{{documentation/version}}/module-header}}&lt;br /&gt;
&amp;lt;!-- ---------------------------- --&amp;gt;&lt;br /&gt;
{{documentation/{{documentation/version}}/module-section|Introduction and Acknowledgements}}&lt;br /&gt;
Author: Andras Lasso (PerkLab, Queen's University), Mikael Brudfors (Laboratorio de Imagen Medica, Hospital Gregorio Maranon - http://image.hggm.es/)&amp;lt;br&amp;gt;&lt;br /&gt;
Contact: Andras Lasso, &amp;lt;email&amp;gt;lasso@queensu.ca&amp;lt;/email&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Project website: http://www.slicerrt.org&amp;lt;br&amp;gt;&lt;br /&gt;
License: [http://www.slicer.org/pages/LicenseText Slicer license]&lt;br /&gt;
{{documentation/{{documentation/version}}/module-introduction-logo-gallery&lt;br /&gt;
|{{collaborator|logo|sparkit}}|SparKit&lt;br /&gt;
|{{collaborator|logo|namic}}|NA-MIC&lt;br /&gt;
|{{collaborator|logo|perklab}}|PerkLab&lt;br /&gt;
|{{collaborator|logo|ocairo}}|OCAIRO&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------- --&amp;gt;&lt;br /&gt;
{{documentation/{{documentation/version}}/extension-section|Extension Description}}&lt;br /&gt;
&lt;br /&gt;
Collection of tools for developing and debugging modules.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------- --&amp;gt;&lt;br /&gt;
{{documentation/{{documentation/version}}/extension-section|Modules}}&lt;br /&gt;
&lt;br /&gt;
* Python Debugger (in category: Developer Tools): allow debugging of Python scripts in the Eclipse integrated development environment using PyDev. Visual debugging (setting breakpoints, execute code step-by-step, view variables, stack, etc.) of Python scripted module is possible by using [http://pydev.org/ PyDev].&lt;br /&gt;
* Node modified statistics (in category: Developer Tools): Module for collecting statistics on timing of node Modified events. It is useful for estimating refresh rate when a live data stream or temporal data sequence is visualized.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------- --&amp;gt;&lt;br /&gt;
{{documentation/{{documentation/version}}/extension-section|Use Cases}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery widths=&amp;quot;200px&amp;quot; perrow=&amp;quot;4&amp;quot;&amp;gt;&lt;br /&gt;
Image:PyDevRemoteDebugSlicer.png|Debugging Slicer in PyDev&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------- --&amp;gt;&lt;br /&gt;
{{documentation/{{documentation/version}}/extension-section|Tutorials}}&lt;br /&gt;
&lt;br /&gt;
===Visual Python debugging in PyCharm===&lt;br /&gt;
&lt;br /&gt;
====One-time setup====&lt;br /&gt;
* Install '''Professional edition''' of [https://www.jetbrains.com/pycharm/download/ PyCharm]. Professional version is avaialable for anybody with an academic email address for free. Free Community edition will not work, as it does not include remote debug server.&lt;br /&gt;
* In PyCharm:&lt;br /&gt;
** In the menu select: Run / Edit configurations&lt;br /&gt;
** Click the small + icon in the top-left (Add new configuration)&lt;br /&gt;
** Select 'Python remote debug' configuration as a template&lt;br /&gt;
** Set Name: ''Slicer remote debugger''&lt;br /&gt;
** Set Port: 5678&lt;br /&gt;
** Click OK&lt;br /&gt;
* In Slicer:&lt;br /&gt;
** Install the Python debugger extension&lt;br /&gt;
** Open the ''Python debugger'' module (in ''Developer Tools'' category)&lt;br /&gt;
** In the ''Settings'' section select debugger: 'PyCharm'&lt;br /&gt;
** If pycharm-debug.egg path is not detected automatically then set the path with the selector&lt;br /&gt;
&lt;br /&gt;
====Start debugging====&lt;br /&gt;
* In PyCharm:&lt;br /&gt;
** In the menu select: Run / Debug, click ''Slicer remote debugger''&lt;br /&gt;
* In Slicer:&lt;br /&gt;
** Open the ''Python debugger'' module (in ''Developer Tools'' category)&lt;br /&gt;
** Click on ''Connect'' button. Slicer will become unresponsive until the debugger is attached.&lt;br /&gt;
** Load your .py file and add breakpoints where you want your execution to stop for debugging.&lt;br /&gt;
** Important: you can open a terminal, where you can enter Python commands while the execution is paused (you have access to all Slicer variable, it has auto-complete, etc). Click the small terminal icon ''Show Python Prompt'' to open the Python console.&lt;br /&gt;
&lt;br /&gt;
===Visual Python debugging in Eclipse===&lt;br /&gt;
&lt;br /&gt;
====One-time setup====&lt;br /&gt;
* Install Eclipse with PyDev: the simplest is to use the standalone preconfigured [http://brainwy.github.io/liclipse/ LiClipse] package&lt;br /&gt;
* Run PyDev and enable the remote debugger tool (if you have trouble following these steps then you can find detailed instructions [http://pydev.org/manual_adv_remote_debugger.html here]):&lt;br /&gt;
** Enable PyDev server: in the menu Window &amp;gt; Customize perspective &amp;gt; Command groups availability &amp;gt; PyDev debug&lt;br /&gt;
** Open the debug window: in the menu Window &amp;gt; Open Perspective &amp;gt; Other &amp;gt; Debug =&amp;gt; &amp;lt;span style=&amp;quot;color: red&amp;quot;&amp;gt;Without this step the ''Resume'' button will be disabled and debugging cannot be started!&amp;lt;/span&amp;gt;&lt;br /&gt;
* In Slicer:&lt;br /&gt;
* Install the Python debugger extension&lt;br /&gt;
** Open the ''Python debugger'' module (in ''Developer Tools'' category)&lt;br /&gt;
** In the ''Settings'' section set the directory that contains the ''pydevd.py'' file. Usually it is in the Eclipse plugins directory /...pydev.../pysrc.&lt;br /&gt;
&lt;br /&gt;
====Start debugging====&lt;br /&gt;
* In PyDev&lt;br /&gt;
** Start the server: on the toolbar click the button &amp;quot;PyDev: start the pydev server&amp;quot;&lt;br /&gt;
[[File:PyDevStartRemoteDebug.png]]&lt;br /&gt;
* In Slicer:&lt;br /&gt;
** Open the ''Python debugger'' module (in ''Developer Tools'' category)&lt;br /&gt;
** Click on ''Connect''&lt;br /&gt;
** If the debugger is successfully attached, then it will pause Slicer, so Slicer becomes unresponsive (until its execution is resumed in PyDev)&lt;br /&gt;
* In PyDev.&lt;br /&gt;
** Slicer execution is now paused. Slicer will become unresponsive until the debugger is attached.&lt;br /&gt;
** Load your .py file into PyDev and add breakpoints (Ctrl+Shift+B) where you want your execution to stop for debugging.&lt;br /&gt;
** Important: you can open a terminal, where you can enter Python commands while the execution is paused (you have access to all Slicer variable, it has auto-complete, etc.) by clicking on &amp;quot;Open Console&amp;quot; (small button at the top of the console view) then chose &amp;quot;PyDev Console&amp;quot; and then &amp;quot;PyDev Debug Console&amp;quot; (after this the title of the console should be &amp;quot;PyDev Debug Console&amp;quot; instead of the default &amp;quot;Debug Server&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------- --&amp;gt;&lt;br /&gt;
{{documentation/{{documentation/version}}/extension-section|Similar Extensions}}&lt;br /&gt;
Alternatively, you can set up Microsoft Visual Studio for remote Python debugging [[documentation/{{documentation/version}}/Developers/Tutorials/Debugging_Python_in_Visual_Studio|as described here]]&lt;br /&gt;
&amp;lt;!-- ---------------------------- --&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
{{documentation/{{documentation/version}}/extension-section|References}}&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------- --&amp;gt;&lt;br /&gt;
{{documentation/{{documentation/version}}/extension-section|Information for Developers}}&lt;br /&gt;
* Source code: https://github.com/SlicerRt/SlicerDebuggingTools&lt;br /&gt;
* Issue tracker:  [https://github.com/SlicerRt/SlicerDebuggingTools/issues open issues and enhancement requests]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------- --&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
{{documentation/{{documentation/version}}/extension-section|Troubleshooting}}&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;!-- ---------------------------- --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ---------------------------- --&amp;gt;&lt;br /&gt;
{{documentation/{{documentation/version}}/extension-footer}}&lt;br /&gt;
&amp;lt;!-- ---------------------------- --&amp;gt;&lt;/div&gt;</summary>
		<author><name>UpdateBot</name></author>
		
	</entry>
</feed>