<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Show current instruction for debugging infinite loop</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/6132ea4bda/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/6132ea4bda/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/6132ea4bda/</id><updated>2021-08-17T14:04:02.699000Z</updated><subtitle>Recent posts to Show current instruction for debugging infinite loop</subtitle><entry><title>Show current instruction for debugging infinite loop</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/6132ea4bda/?limit=25#22dc" rel="alternate"/><published>2021-08-17T14:04:02.699000Z</published><updated>2021-08-17T14:04:02.699000Z</updated><author><name>Ingo</name><uri>https://forge.codesys.com/u/ingo/</uri></author><id>https://forge.codesys.com2fa98f360c35f5c56e557258458628cd0e8cf134</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Did you try to define a watchdog for the task?&lt;br/&gt;
Usually an expired watchdog should show you the endless loop:&lt;br/&gt;
&lt;a href="https://www.youtube.com/watch?v=Aeihipp6U4I" rel="nofollow"&gt;https://www.youtube.com/watch?v=Aeihipp6U4I&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Show current instruction for debugging infinite loop</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/6132ea4bda/?limit=25#dfec" rel="alternate"/><published>2021-08-17T08:05:02.170000Z</published><updated>2021-08-17T08:05:02.170000Z</updated><author><name>maoravni</name><uri>https://forge.codesys.com/u/maoravni/</uri></author><id>https://forge.codesys.com29750bdff1a25c52f67e1cb386d1027242967b03</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;My code has a reproducible case of infinite loop, but it only happens when running without any breakpoints. &lt;/p&gt;
&lt;p&gt;The observed behavior is the freewheeling task is not finishing.&lt;/p&gt;
&lt;p&gt;Debugging by setting breakpoints "fixes" this behavior. When I press "STOP" the application stops.&lt;/p&gt;
&lt;p&gt;I couldn't find any way to debug this - show me where the freewheeling task was executing before stop.&lt;/p&gt;
&lt;p&gt;Is there any way to break at the infinite loop (which I don't know where it's located in the code...)&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>