<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Stop infinite loop in AutoCAD using VsCode in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/stop-infinite-loop-in-autocad-using-vscode/m-p/12630566#M16600</link>
    <description>&lt;P&gt;Hello boys how are you.&lt;BR /&gt;I wanted to ask if anyone knows how to get out of an infinite loop in AutoCAD using VsCode.&lt;BR /&gt;Today by mistake I was working with the while function and I did not set the condition for it to stop.&lt;BR /&gt;So it stayed in an infinite loop in autocad, I stopped debugging in vscode and nothing happened in autocad, I also closed vscode completely and the loop continued in autocad.&lt;BR /&gt;I tried with the escape key, enter, all possible but I couldn't stop the cycle, the only thing was to enter the application manager and forcefully close autocad.&lt;BR /&gt;If anyone knows a method to stop the loop, I would be grateful if you could tell me how to do it.&lt;BR /&gt;Greetings.&lt;/P&gt;</description>
    <pubDate>Sun, 10 Mar 2024 17:24:58 GMT</pubDate>
    <dc:creator>carlos_m_gil_p</dc:creator>
    <dc:date>2024-03-10T17:24:58Z</dc:date>
    <item>
      <title>Stop infinite loop in AutoCAD using VsCode</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/stop-infinite-loop-in-autocad-using-vscode/m-p/12630566#M16600</link>
      <description>&lt;P&gt;Hello boys how are you.&lt;BR /&gt;I wanted to ask if anyone knows how to get out of an infinite loop in AutoCAD using VsCode.&lt;BR /&gt;Today by mistake I was working with the while function and I did not set the condition for it to stop.&lt;BR /&gt;So it stayed in an infinite loop in autocad, I stopped debugging in vscode and nothing happened in autocad, I also closed vscode completely and the loop continued in autocad.&lt;BR /&gt;I tried with the escape key, enter, all possible but I couldn't stop the cycle, the only thing was to enter the application manager and forcefully close autocad.&lt;BR /&gt;If anyone knows a method to stop the loop, I would be grateful if you could tell me how to do it.&lt;BR /&gt;Greetings.&lt;/P&gt;</description>
      <pubDate>Sun, 10 Mar 2024 17:24:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/stop-infinite-loop-in-autocad-using-vscode/m-p/12630566#M16600</guid>
      <dc:creator>carlos_m_gil_p</dc:creator>
      <dc:date>2024-03-10T17:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: Stop infinite loop in AutoCAD using VsCode</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/stop-infinite-loop-in-autocad-using-vscode/m-p/12630896#M16601</link>
      <description>&lt;P&gt;A google search said to try&amp;nbsp;&lt;SPAN&gt;Shift+F5.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Mar 2024 22:35:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/stop-infinite-loop-in-autocad-using-vscode/m-p/12630896#M16601</guid>
      <dc:creator>leeminardi</dc:creator>
      <dc:date>2024-03-10T22:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Stop infinite loop in AutoCAD using VsCode</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/stop-infinite-loop-in-autocad-using-vscode/m-p/12630954#M16602</link>
      <description>&lt;P&gt;I just had same problem this morning, restarted 5 times,&amp;nbsp; if there is lots of code in your loop so not obvious why its not working you can do say a X+1 if x= 1000 (EXIT), just put the increment X as part of a IF. The (EXIT) is a valid function and will do just that jump out of your lisp that is running, move the IF X till you find the spot that is not working.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Mar 2024 23:27:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/stop-infinite-loop-in-autocad-using-vscode/m-p/12630954#M16602</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2024-03-10T23:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Stop infinite loop in AutoCAD using VsCode</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/stop-infinite-loop-in-autocad-using-vscode/m-p/12674402#M16603</link>
      <description>&lt;P&gt;Hello &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/822616"&gt;@leeminardi&lt;/a&gt;&amp;nbsp;how are you.&lt;BR /&gt;I tried to do it with Shift+F5 and it didn't work, I don't know what other option it could be.&lt;/P&gt;&lt;P&gt;It only stops debugging in vscode.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Hello &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6254908"&gt;@Sea-Haven&lt;/a&gt;&amp;nbsp;how are you.&lt;BR /&gt;Yes, it is a very good option, the problem is that I will have to do it whenever I do a while.&lt;BR /&gt;In this case, do not place the variable, that is, forget it. And then I couldn't get out of the loop.&lt;BR /&gt;That's why I was trying to find an option to stop the loop in AutoCAD.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Excuse my English, I only speak Spanish.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2024 13:33:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/stop-infinite-loop-in-autocad-using-vscode/m-p/12674402#M16603</guid>
      <dc:creator>carlos_m_gil_p</dc:creator>
      <dc:date>2024-03-29T13:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: Stop infinite loop in AutoCAD using VsCode</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/stop-infinite-loop-in-autocad-using-vscode/m-p/12674711#M16604</link>
      <description>&lt;P&gt;Hola&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2573929"&gt;@carlos_m_gil_p&lt;/a&gt;&amp;nbsp;,&amp;nbsp; I hope you are well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you tried setting breakpoints at the while statements and check if the variables affecting the condition whether or not to continue the loop are changing as you think they should?&lt;/P&gt;&lt;P&gt;&lt;A href="https://code.visualstudio.com/docs/editor/debugging" target="_blank"&gt;https://code.visualstudio.com/docs/editor/debugging&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2024 16:13:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/stop-infinite-loop-in-autocad-using-vscode/m-p/12674711#M16604</guid>
      <dc:creator>leeminardi</dc:creator>
      <dc:date>2024-03-29T16:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: Stop infinite loop in AutoCAD using VsCode</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/stop-infinite-loop-in-autocad-using-vscode/m-p/12675630#M16605</link>
      <description>&lt;P&gt;If I have knowledge about this topic, I also know how to work with while.&lt;BR /&gt;It was just an oversight, but I am left wondering, if it were to happen to me at some point, what I could do to resolve it.&lt;BR /&gt;Thanks for the contributions.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Mar 2024 05:31:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/stop-infinite-loop-in-autocad-using-vscode/m-p/12675630#M16605</guid>
      <dc:creator>carlos_m_gil_p</dc:creator>
      <dc:date>2024-03-30T05:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: Stop infinite loop in AutoCAD using VsCode</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/stop-infinite-loop-in-autocad-using-vscode/m-p/12681320#M16606</link>
      <description>&lt;P&gt;similar things also happen to me regularly.. i always have my vscode linked to my autocad session (F5). When it gets stuck in an infinite loop i just tap the reload button and that usually breaks out of the running lisps.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="EnM4st3r_0-1712064101483.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1344716i97B3ADE15F33C23E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="EnM4st3r_0-1712064101483.png" alt="EnM4st3r_0-1712064101483.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 13:20:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/stop-infinite-loop-in-autocad-using-vscode/m-p/12681320#M16606</guid>
      <dc:creator>EnM4st3r</dc:creator>
      <dc:date>2024-04-02T13:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: Stop infinite loop in AutoCAD using VsCode</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/stop-infinite-loop-in-autocad-using-vscode/m-p/12681557#M16607</link>
      <description>&lt;P&gt;Hello brother, thanks for your help, but it didn't work for me.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 15:20:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/stop-infinite-loop-in-autocad-using-vscode/m-p/12681557#M16607</guid>
      <dc:creator>carlos_m_gil_p</dc:creator>
      <dc:date>2024-04-02T15:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: Stop infinite loop in AutoCAD using VsCode</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/stop-infinite-loop-in-autocad-using-vscode/m-p/12682878#M16608</link>
      <description>&lt;P&gt;Yep can occur with lisp also and just use task manager to stop. Tried all the normals ESC CTrl+c Break and so on.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 03:05:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/stop-infinite-loop-in-autocad-using-vscode/m-p/12682878#M16608</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2024-04-03T03:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: Stop infinite loop in AutoCAD using VsCode</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/stop-infinite-loop-in-autocad-using-vscode/m-p/12683359#M16609</link>
      <description>&lt;P&gt;hm, maybe your VSC is not attached to AutoCAD correctly or its not setup correct?&lt;BR /&gt;I for example tried this loop and it breaks out as i said&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:whilebreak (/ a)
  (setq a 0)
  (while t 
    (setq a (1+ a))
  )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 08:20:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/stop-infinite-loop-in-autocad-using-vscode/m-p/12683359#M16609</guid>
      <dc:creator>EnM4st3r</dc:creator>
      <dc:date>2024-04-03T08:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Stop infinite loop in AutoCAD using VsCode</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/stop-infinite-loop-in-autocad-using-vscode/m-p/12684085#M16610</link>
      <description>&lt;P&gt;Hello &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13194973"&gt;@EnM4st3r&lt;/a&gt;&amp;nbsp;how are you.&lt;BR /&gt;Thanks for continuing to help.&lt;BR /&gt;In your example the while condition is T, which means that if you press ESC it will return NIL and stop it.&lt;BR /&gt;Try this example I show.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:xxx (/) 
  (setq cont t)
  (while cont 
    (if 
      (and 
        (not (vl-catch-all-error-p (setq pt (vl-catch-all-apply 'getpoint))))
        (not (null pt)))
      (setq cont t)))
  (exit))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 13:28:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/stop-infinite-loop-in-autocad-using-vscode/m-p/12684085#M16610</guid>
      <dc:creator>carlos_m_gil_p</dc:creator>
      <dc:date>2024-04-03T13:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: Stop infinite loop in AutoCAD using VsCode</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/stop-infinite-loop-in-autocad-using-vscode/m-p/12684299#M16611</link>
      <description>&lt;P&gt;hm, that rly doesnt work with your example.. thought my example would be the same since hitting ESC also does not work for me with it. Maybe post an issue report here?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://github.com/Autodesk-AutoCAD/AutoLispExt/issues" target="_blank" rel="noopener"&gt;https://github.com/Autodesk-AutoCAD/AutoLispExt/issueshttps://github.com/Autodesk-AutoCAD/AutoLispExt/issues&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 14:37:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/stop-infinite-loop-in-autocad-using-vscode/m-p/12684299#M16611</guid>
      <dc:creator>EnM4st3r</dc:creator>
      <dc:date>2024-04-03T14:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: Stop infinite loop in AutoCAD using VsCode</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/stop-infinite-loop-in-autocad-using-vscode/m-p/12688203#M16612</link>
      <description>&lt;P&gt;Thanks, I already did it.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 23:50:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/stop-infinite-loop-in-autocad-using-vscode/m-p/12688203#M16612</guid>
      <dc:creator>carlos_m_gil_p</dc:creator>
      <dc:date>2024-04-04T23:50:25Z</dc:date>
    </item>
  </channel>
</rss>

