<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Yago Crispim Rodrigues Souza</title>
    <description>The latest articles on DEV Community by Yago Crispim Rodrigues Souza (@yagocrispim).</description>
    <link>https://dev.to/yagocrispim</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F621515%2F05e9956f-2c98-41d0-ad4f-d2d485f6c4d7.jpg</url>
      <title>DEV Community: Yago Crispim Rodrigues Souza</title>
      <link>https://dev.to/yagocrispim</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yagocrispim"/>
    <language>en</language>
    <item>
      <title>Debugging Lua with LuaRocks packages in VSCode</title>
      <dc:creator>Yago Crispim Rodrigues Souza</dc:creator>
      <pubDate>Mon, 13 Nov 2023 11:19:56 +0000</pubDate>
      <link>https://dev.to/yagocrispim/debugging-lua-with-luarocks-packages-in-vscode-12hk</link>
      <guid>https://dev.to/yagocrispim/debugging-lua-with-luarocks-packages-in-vscode-12hk</guid>
      <description>&lt;p&gt;Debugging using "print" is okay, but it's not productive or efficient. This is why I like to use the debugger.&lt;/p&gt;

&lt;p&gt;But, when I install packages using LuaRocks the debugger can't find the path to the "lua_modules" folder.&lt;/p&gt;

&lt;p&gt;If you also have this problem, you can add the code below to the first line of your main file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight lua"&gt;&lt;code&gt;&lt;span class="kd"&gt;local&lt;/span&gt; &lt;span class="n"&gt;LUA_PATH&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'my LUA_PATH from "$ luarocks path"'&lt;/span&gt;
&lt;span class="kd"&gt;local&lt;/span&gt; &lt;span class="n"&gt;LUA_CPATH&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'my LUA_CPATH from "$ luarocks path"'&lt;/span&gt;

&lt;span class="nb"&gt;package.path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;package.path&lt;/span&gt; &lt;span class="o"&gt;..&lt;/span&gt; &lt;span class="s1"&gt;';'&lt;/span&gt; &lt;span class="o"&gt;..&lt;/span&gt; &lt;span class="n"&gt;LUA_PATH&lt;/span&gt;
&lt;span class="nb"&gt;package.cpath&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;package.cpath&lt;/span&gt; &lt;span class="o"&gt;..&lt;/span&gt; &lt;span class="s1"&gt;';'&lt;/span&gt; &lt;span class="o"&gt;..&lt;/span&gt; &lt;span class="n"&gt;LUA_CPATH&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I hope you found this post helpful.&lt;br&gt;
If you have any questions, please feel free to leave a comment.&lt;/p&gt;

</description>
      <category>lua</category>
      <category>luarocks</category>
      <category>vscode</category>
      <category>debug</category>
    </item>
  </channel>
</rss>
