<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mscneuro.neuro.uni-bremen.de/index.php?action=history&amp;feed=atom&amp;title=VS_Code_Debugging</id>
	<title>VS Code Debugging - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mscneuro.neuro.uni-bremen.de/index.php?action=history&amp;feed=atom&amp;title=VS_Code_Debugging"/>
	<link rel="alternate" type="text/html" href="https://mscneuro.neuro.uni-bremen.de/index.php?title=VS_Code_Debugging&amp;action=history"/>
	<updated>2026-04-16T22:35:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://mscneuro.neuro.uni-bremen.de/index.php?title=VS_Code_Debugging&amp;diff=305&amp;oldid=prev</id>
		<title>Davrot at 15:44, 17 October 2025</title>
		<link rel="alternate" type="text/html" href="https://mscneuro.neuro.uni-bremen.de/index.php?title=VS_Code_Debugging&amp;diff=305&amp;oldid=prev"/>
		<updated>2025-10-17T15:44:16Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:44, 17 October 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== The goal ==&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;We want to debug our Python source code like professionals.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;We want to debug our Python source code like professionals.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l97&quot;&gt;Line 97:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 96:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;Then [[File:2022-04-01_21-30_3.png|image22]] Step Into:&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;Then [[File:2022-04-01_21-30_3.png|image22]] Step Into:&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:2022-04-02_00-31_1_0.png|image23]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:2022-04-02_00-31_1_0.png|image23]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;Then [[File:2022-04-01_21-31.png|image24]] Step Out :&amp;lt;div class=&quot;figure&quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;Then [[File:2022-04-01_21-31.png|image24]] Step Out:&amp;lt;div class=&quot;figure&quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:2022-04-02_00-32.png|image25]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:2022-04-02_00-32.png|image25]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l109&quot;&gt;Line 109:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 108:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:2022-04-01_21-18.png|image26]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:2022-04-01_21-18.png|image26]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;If you click again then the red dot vanishes and the breakpoint is removed.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;If you click again then the red dot vanishes and the breakpoint is removed.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You can use the context menu (right mouse button) do deactivate or enable an existing breakpoint. In the case of a disabled breakpoint it turns gray.&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;You can use the context menu (right mouse button) do deactivate or enable an existing breakpoint. In the case of a disabled breakpoint it turns gray.&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff:1.41:old-106:rev-305:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Davrot</name></author>
	</entry>
	<entry>
		<id>https://mscneuro.neuro.uni-bremen.de/index.php?title=VS_Code_Debugging&amp;diff=106&amp;oldid=prev</id>
		<title>Davrot: /* Step Into */</title>
		<link rel="alternate" type="text/html" href="https://mscneuro.neuro.uni-bremen.de/index.php?title=VS_Code_Debugging&amp;diff=106&amp;oldid=prev"/>
		<updated>2025-10-14T15:31:29Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Step Into&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:31, 14 October 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l86&quot;&gt;Line 86:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 86:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:2022-04-02_00-27.png|image18]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:2022-04-02_00-27.png|image18]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;Then [[File:2022-04-01_21-30_3.png|image19]] Step Into:&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;Then [[File:2022-04-01_21-30_3.png|image19]] Step Into:&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;2022&lt;/del&gt;-&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;04&lt;/del&gt;-&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;02_00&lt;/del&gt;-&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;31_1&lt;/del&gt;.png|image20]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;2025&lt;/ins&gt;-&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;10&lt;/ins&gt;-&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;14 17&lt;/ins&gt;-&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;30&lt;/ins&gt;.png|image20]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff:1.41:old-72:rev-106:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Davrot</name></author>
	</entry>
	<entry>
		<id>https://mscneuro.neuro.uni-bremen.de/index.php?title=VS_Code_Debugging&amp;diff=72&amp;oldid=prev</id>
		<title>Davrot: Created page with &quot; == The goal == We want to debug our Python source code like professionals.  Questions to [mailto:davrot@uni-bremen.de David Rotermund]  == Simple debugging in cell mode == If we use cells ( # %% ) (i.e. Python Interactive window ) then we can use the Variable button in the interactive Python window to open a variable viewer.&lt;div class=&quot;figure&quot;&gt; image1 &lt;/div&gt;Also you can interact with the Python kernel directly via the command input line (...&quot;</title>
		<link rel="alternate" type="text/html" href="https://mscneuro.neuro.uni-bremen.de/index.php?title=VS_Code_Debugging&amp;diff=72&amp;oldid=prev"/>
		<updated>2025-10-14T15:12:13Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; == The goal == We want to debug our Python source code like professionals.  Questions to [mailto:davrot@uni-bremen.de David Rotermund]  == Simple debugging in cell mode == If we use cells ( # %% ) (i.e. Python Interactive window ) then we can use the Variable button in the interactive Python window to open a variable viewer.&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt; &lt;a href=&quot;/index.php/File:2022-04-01_18-40_0.png&quot; title=&quot;File:2022-04-01 18-40 0.png&quot;&gt;image1&lt;/a&gt; &amp;lt;/div&amp;gt;Also you can interact with the Python kernel directly via the command input line (...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
== The goal ==&lt;br /&gt;
We want to debug our Python source code like professionals.&lt;br /&gt;
&lt;br /&gt;
Questions to [mailto:davrot@uni-bremen.de David Rotermund]&lt;br /&gt;
&lt;br /&gt;
== Simple debugging in cell mode ==&lt;br /&gt;
If we use cells ( # %% ) (i.e. Python Interactive window ) then we can use the Variable button in the interactive Python window to open a variable viewer.&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-01 18-40 0.png|image1]]&lt;br /&gt;
&amp;lt;/div&amp;gt;Also you can interact with the Python kernel directly via the command input line (the lower thing in the interactive window). There you can enter a Python command and press Shift + Enter to execute it.&lt;br /&gt;
&lt;br /&gt;
== Where to find the debugger (normal mode)? ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-01 21-12.png|image2]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Where to find the debugger (cell mode)? ==&lt;br /&gt;
&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-01 21-48 1.png|image3]]&lt;br /&gt;
&amp;lt;/div&amp;gt;Note: My first Step Over [[File:2022-04-01 21-30 2.png|image4]] click is ignored. Why? I don’t know.&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-01 21-47 0.png|image5]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Debugger controls ==&lt;br /&gt;
&lt;br /&gt;
=== Control toolbar ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|[[File:2022-04-01 21-30.png|image6]]&lt;br /&gt;
|Continue – Debugger continues to run the code until the next breakpoint is reached or until the program ends. If end of the program is reached, the debugger closes.&lt;br /&gt;
|-&lt;br /&gt;
|[[File:2022-04-01_21-30_2.png|image7]]&lt;br /&gt;
|Step Over&lt;br /&gt;
|-&lt;br /&gt;
|[[File:2022-04-01_21-30_3.png|image8]]&lt;br /&gt;
|Step Into&lt;br /&gt;
|-&lt;br /&gt;
|[[File:2022-04-01_21-31.png|image9]]&lt;br /&gt;
|Step Out&lt;br /&gt;
|-&lt;br /&gt;
|[[File:2022-04-01_21-31_1.png|image10]]&lt;br /&gt;
|Restart – Starts the debugging process from the beginning.&lt;br /&gt;
|-&lt;br /&gt;
|[[File:2022-04-01_21-31_2.png|image11]]&lt;br /&gt;
|Stop – Stops the debugging and the debugger closes.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Continue vs Step Over vs Step Into vs Step Out ===&lt;br /&gt;
Example code:&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;# %%&lt;br /&gt;
def function(x: int) -&amp;gt; int:&lt;br /&gt;
    x += 1&lt;br /&gt;
    x += 1&lt;br /&gt;
    x += 1&lt;br /&gt;
    x += 1&lt;br /&gt;
    return x&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
x = 1&lt;br /&gt;
x = function(x)&lt;br /&gt;
x = function(x)&lt;br /&gt;
x = function(x)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Continue ===&lt;br /&gt;
&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-02_00-20.png|image12]]&lt;br /&gt;
&amp;lt;/div&amp;gt;Then [[File:2022-04-01_21-30.png|image13]] Continue:&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-02_00-22.png|image14]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step Over ===&lt;br /&gt;
&lt;br /&gt;
* [https://docs.microsoft.com/en-us/visualstudio/debugger/navigating-through-code-with-the-debugger?view=vs-2022#BKMK_Step_over_Step_out “If the current line contains a function call, Step Over runs the code and then suspends execution at the first line of code after the called function returns.”]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-02_00-25_1.png|image15]]&lt;br /&gt;
&amp;lt;/div&amp;gt;Then [[File:2022-04-01_21-30_2.png|image16]] Step Over:&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-02_00-26.png|image17]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step Into ===&lt;br /&gt;
&lt;br /&gt;
* [https://docs.microsoft.com/en-us/visualstudio/debugger/navigating-through-code-with-the-debugger?view=vs-2022#BKMK_Step_into__over__or_out_of_the_code “The debugger steps through code statements, not physical lines.”]&lt;br /&gt;
* [https://docs.microsoft.com/en-us/visualstudio/debugger/navigating-through-code-with-the-debugger?view=vs-2022#BKMK_Step_into__over__or_out_of_the_code “But when you step into this line, the debugger treats the condition as one step and the consequence as another.”]&lt;br /&gt;
* [https://docs.microsoft.com/en-us/visualstudio/debugger/navigating-through-code-with-the-debugger?view=vs-2022#BKMK_Step_into__over__or_out_of_the_code “On a nested function call, Step Into steps into the most deeply nested function. For example, if you use Step Into on a call like Func1(Func2()), the debugger steps into the function Func2.”]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-02_00-27.png|image18]]&lt;br /&gt;
&amp;lt;/div&amp;gt;Then [[File:2022-04-01_21-30_3.png|image19]] Step Into:&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-02_00-31_1.png|image20]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step Out ===&lt;br /&gt;
&lt;br /&gt;
* [https://docs.microsoft.com/en-us/visualstudio/debugger/navigating-through-code-with-the-debugger?view=vs-2022#BKMK_Step_over_Step_out “Step Out continues running code and suspends execution when the current function returns. The debugger skips through the current function.”]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-02_00-27.png|image21]]&lt;br /&gt;
&amp;lt;/div&amp;gt;Then [[File:2022-04-01_21-30_3.png|image22]] Step Into:&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-02_00-31_1_0.png|image23]]&lt;br /&gt;
&amp;lt;/div&amp;gt;Then [[File:2022-04-01_21-31.png|image24]] Step Out :&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-02_00-32.png|image25]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Breakpoints ==&lt;br /&gt;
&lt;br /&gt;
== Normal Breakpoints ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;No breakpoint =&amp;amp;#x3E; No debugging.&amp;#039;&amp;#039;&amp;#039; You need to set breakpoints. Thus the debugger know where you want it to stop and allow you to investigate the state of your program.&lt;br /&gt;
&lt;br /&gt;
You can create breakpoints by making these red dot in your source code. You just click left beside the line number (with the left mouse button) and get a new breakpoint.&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-01_21-18.png|image26]]&lt;br /&gt;
&amp;lt;/div&amp;gt;If you click again then the red dot vanishes and the breakpoint is removed.&lt;br /&gt;
&lt;br /&gt;
You can use the context menu (right mouse button) do deactivate or enable an existing breakpoint. In the case of a disabled breakpoint it turns gray.&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-01_21-20.png|image27]]&lt;br /&gt;
&amp;lt;/div&amp;gt;In the breakpoint window, you see all your breakpoints. The X Symbol removes the breakpoint. Removing a blue checkmark disables the corresponding breakpoint.&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-01_21-15_0.png|image28]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Expression ===&lt;br /&gt;
We can use the context menu (right mouse click) to add “Add Conditional Breakpoint…”. Expression allow to define a condition that needs to be true to activate the breakpoint.&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-02_00-55.png|image29]]&lt;br /&gt;
&amp;lt;/div&amp;gt;Now is a not fully filled dot.&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-02_00-56_0.png|image30]]&lt;br /&gt;
&amp;lt;/div&amp;gt;You can use the context menu to change the condition or delete the breakpoint.&lt;br /&gt;
&lt;br /&gt;
If you start debugging, this is where the debugger stops as initial breakpoint:&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-02_01-00_0.png|image31]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Hit Count ===&lt;br /&gt;
Hit Count (defined via the context menu) allows to set an integer value for how often a position in a source code needs to be “hit” (i.e. run) until a breakpoint is activated.&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-02_01-03.png|image32]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-02_01-06_0.png|image33]]&lt;br /&gt;
&amp;lt;/div&amp;gt;If you start debugging, this is where the debugger stops as initial breakpoint:&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-02_01-07_0.png|image34]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Log Message / Add Log Point… ===&lt;br /&gt;
Log Message allows you to add the generation debug messages (messages in the debug console). If this “breakpoint” is passed by the debugger then a debug message is generated. However this is not a breakpoint that stops running the program like a normal breakpoint would. The message is defined akin to [https://docs.python.org/3/tutorial/inputoutput.html#tut-f-strings “Formatted String Literals”] (also called f-string).&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-02_01-11.png|image35]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-02_01-13.png|image36]]&lt;br /&gt;
&amp;lt;/div&amp;gt;Running the debugger creates the following messages in the Debug Console:&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-02_01-12.png|image37]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Function Breakpoints ===&lt;br /&gt;
In the Breakpoints window we can add Function Breakpoints. If the function named in the list is called that a breakpoint is initiated.&lt;br /&gt;
&lt;br /&gt;
Use the + symbol:&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-02_01-40_0.png|image38]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-02_01-38_0.png|image39]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Raise Exception Breakpoints ===&lt;br /&gt;
You can break on throwing exceptions even if we catch them. However, we need another breakpoint (disabled or enabled) otherwise we cannot enable the Raise Exception breakpoints.&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-02_01-46_0.png|image40]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-02_01-52_0.png|image41]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Starting the debug process ==&lt;br /&gt;
When we are happy with the placement of the breakpoints, we click on “Run and Debug”. Then we tell the debugger that this is a Python file.&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-01_21-25_0.png|image42]]&lt;br /&gt;
&amp;lt;/div&amp;gt;The yellow thingy tells us where in the source code we are in the moment:&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-01_21-28.png|image43]]&lt;br /&gt;
&amp;lt;/div&amp;gt;If we press &amp;#039;&amp;#039;&amp;#039;Continue&amp;#039;&amp;#039;&amp;#039; then the debugger goes to the next breakpoint and we can view the content of the variables:&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-01_21-44_0.png|image44]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Watch window ==&lt;br /&gt;
You can add variables to the watch window. This allows to observe variables and we can even watch slices of a numpy array:&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-02_01-26_0.png|image45]]&lt;br /&gt;
&amp;lt;/div&amp;gt;You can add variables from the variable window via the context menu.&lt;br /&gt;
&lt;br /&gt;
== Debug console ==&lt;br /&gt;
When the debugger waits for the next command from us, we can use the &amp;#039;&amp;#039;&amp;#039;Debug Console&amp;#039;&amp;#039;&amp;#039; to interact with the program. For example: We can print the value of variables or replace them with new values. If the console is not open already then you find it in the menu under View -&amp;amp;#x3E; Debug Console.&amp;lt;div class=&amp;quot;figure&amp;quot;&amp;gt;&lt;br /&gt;
[[File:2022-04-01_21-59_0.png|image46]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [https://docs.microsoft.com/en-us/visualstudio/debugger/navigating-through-code-with-the-debugger?view=vs-2022 Navigate through code by using the Visual Studio debugger]&lt;br /&gt;
* [https://code.visualstudio.com/docs/editor/debugging Debugging in VS Code]&lt;br /&gt;
* [https://code.visualstudio.com/docs/python/debugging Python debugging in VS Code]&lt;/div&gt;</summary>
		<author><name>Davrot</name></author>
	</entry>
</feed>