<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://kfdani-001-site10.gtempurl.com/index.php?action=history&amp;feed=atom&amp;title=OpenSite%2FGuides%2FDebug_a_Python_script</id>
	<title>OpenSite/Guides/Debug a Python script - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://kfdani-001-site10.gtempurl.com/index.php?action=history&amp;feed=atom&amp;title=OpenSite%2FGuides%2FDebug_a_Python_script"/>
	<link rel="alternate" type="text/html" href="https://kfdani-001-site10.gtempurl.com/index.php?title=OpenSite/Guides/Debug_a_Python_script&amp;action=history"/>
	<updated>2026-10-30T01:48:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://kfdani-001-site10.gtempurl.com/index.php?title=OpenSite/Guides/Debug_a_Python_script&amp;diff=867&amp;oldid=prev</id>
		<title>BathAfrica: Add rewritten practical lesson with steps, code and expected results</title>
		<link rel="alternate" type="text/html" href="https://kfdani-001-site10.gtempurl.com/index.php?title=OpenSite/Guides/Debug_a_Python_script&amp;diff=867&amp;oldid=prev"/>
		<updated>2026-10-29T21:01:09Z</updated>

		<summary type="html">&lt;p&gt;Add rewritten practical lesson with steps, code and expected results&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__&lt;br /&gt;
{{OpenSite scope}}&lt;br /&gt;
{{OpenSite lesson&lt;br /&gt;
|id=opensite.help.debug-a-python-script&lt;br /&gt;
|summary=Follow a short calculation through Python-line debugging and inspect a deliberate error.&lt;br /&gt;
|prerequisites=The desktop Python workbench with Python enabled. Save a practice script; use the Debugger rather than the Console transcript to inspect a paused stack.&lt;br /&gt;
|steps==== Prepare a small file ===&lt;br /&gt;
{{Code|lang=python|code=&amp;lt;nowiki&amp;gt;lengths = [2.0, 3.0, 4.0]&lt;br /&gt;
for length in lengths:&lt;br /&gt;
    squared = length * length&lt;br /&gt;
    print(length, squared)&lt;br /&gt;
print(&amp;quot;done&amp;quot;)&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
=== Start Debug file ===&lt;br /&gt;
Use the workbench’s Debug file action. At a pause, inspect the stack and variables in the Debugger panel.&lt;br /&gt;
&lt;br /&gt;
=== Step through the loop ===&lt;br /&gt;
Step into, over or out as appropriate. Watch &amp;lt;code&amp;gt;length&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;squared&amp;lt;/code&amp;gt;. Current-file assistance and runtime debugging are separate features.&lt;br /&gt;
&lt;br /&gt;
=== Trace an intentional failure ===&lt;br /&gt;
In a separate practice file, run &amp;lt;code&amp;gt;raise ValueError(&amp;quot;practice failure&amp;quot;)&amp;lt;/code&amp;gt;. Read the traceback file and line. Script Output records the failure; debugger frame selection provides navigation.&lt;br /&gt;
&lt;br /&gt;
=== Stop and wait ===&lt;br /&gt;
Stop requests interruption. Wait for the lane to become idle before running another script or property expression.&lt;br /&gt;
&lt;br /&gt;
|result=The loop produces (2, 4), (3, 9) and (4, 16). The error exercise identifies its own file/line without changing an engineering document.&lt;br /&gt;
|limitations=The debugger steps Python lines, not native solver/library instructions. Native calls may keep running until they return; a Stop request is not proof of immediate interruption.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;os-page-nav&amp;quot;&amp;gt;{{Docnav|OpenSite/Guides/Discover commands|OpenSite/Guides/Publish a plot|OpenSite/Guides|All guides}}&amp;lt;/div&amp;gt;&lt;br /&gt;
[[Category:OpenSite documentation]]&lt;/div&gt;</summary>
		<author><name>BathAfrica</name></author>
	</entry>
</feed>