<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://community.activestate.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>ActiveState Community Site - Debugging extensions? - Comments</title>
 <link>http://community.activestate.com/forum-topic/debugging-extensions</link>
 <description>Comments for &quot;Debugging extensions?&quot;</description>
 <language>en</language>
<item>
 <title>Todd, that works great;</title>
 <link>http://community.activestate.com/forum-topic/debugging-extensions#comment-5099</link>
 <description>&lt;p&gt;Todd, that works great; unfortunately only with Komodo IDE 4 though. Hopefully the 21-day trial lasts long enough for me to debug my problem!&lt;/p&gt;
</description>
 <pubDate>Fri, 18 Apr 2008 05:05:24 -0700</pubDate>
 <dc:creator>bcorfman</dc:creator>
 <guid isPermaLink="false">comment 5099 at http://community.activestate.com</guid>
</item>
<item>
 <title>Maybe</title>
 <link>http://community.activestate.com/forum-topic/debugging-extensions#comment-5062</link>
 <description>&lt;p&gt;If your running Komodo Edit for &quot;KomodoNose&quot; above, then yes this should work. I&#039;d recommend not copying the dbgp files across to the &quot;KomodoNose&quot; installation, instead use the following code to setup the breakpoint:&lt;/p&gt;
&lt;div class=&quot;geshi-block&quot;&gt;
&lt;div class=&quot;geshifilter python&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #dc143c;&quot;&gt;sys&lt;/span&gt;&lt;br /&gt;
DBGP_PATH = &lt;span style=&quot;color: #483d8b;&quot;&gt;&amp;quot;/Komodo-Pro-3.5/lib/support/dbgp/pythonlib&amp;quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;if&lt;/span&gt; DBGP_PATH &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;not&lt;/span&gt; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #dc143c;&quot;&gt;sys&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;path&lt;/span&gt;:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #dc143c;&quot;&gt;sys&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;path&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;append&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;DBGP_PATH&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;import&lt;/span&gt; dbgp.&lt;span style=&quot;color: black;&quot;&gt;client&lt;/span&gt;&lt;br /&gt;
dbgp.&lt;span style=&quot;color: black;&quot;&gt;client&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;brk&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;host=&lt;span style=&quot;color: #483d8b;&quot;&gt;&amp;quot;localhost&amp;quot;&lt;/span&gt;, port=&lt;span style=&quot;color: #ff4500;&quot;&gt;9000&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;geshi-plain&quot;&gt;import sys
DBGP_PATH = &amp;quot;/Komodo-Pro-3.5/lib/support/dbgp/pythonlib&amp;quot;
if DBGP_PATH not in sys.path:
    sys.path.append(DBGP_PATH)
import dbgp.client
dbgp.client.brk(host=&amp;quot;localhost&amp;quot;, port=9000)&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Cheers,&lt;br /&gt;
Todd&lt;/p&gt;
</description>
 <pubDate>Wed, 16 Apr 2008 13:27:44 -0700</pubDate>
 <dc:creator>ToddW</dc:creator>
 <guid isPermaLink="false">comment 5062 at http://community.activestate.com</guid>
</item>
<item>
 <title>Will this work with Komodo</title>
 <link>http://community.activestate.com/forum-topic/debugging-extensions#comment-5059</link>
 <description>&lt;p&gt;Will this work with Komodo IDE 3.5? That&#039;s the only IDE version I have.&lt;/p&gt;
</description>
 <pubDate>Wed, 16 Apr 2008 11:23:19 -0700</pubDate>
 <dc:creator>bcorfman</dc:creator>
 <guid isPermaLink="false">comment 5059 at http://community.activestate.com</guid>
</item>
<item>
 <title>re: debugging python in Komodo</title>
 <link>http://community.activestate.com/forum-topic/debugging-extensions#comment-5058</link>
 <description>&lt;p&gt;It is certainly possible to debug the Python code that is running inside of Komodo, though I&#039;m not sure about using pdb (as I&#039;m not sure about interaction and UI side of things). I occasionally will debug one Komodo session with another Komodo instance though. Here are some steps I use to achieve this:&lt;/p&gt;
&lt;ul type=&quot;number&quot;&gt;
&lt;li&gt;You&#039;ll need two installations of Komodo (one for running the nose tests &quot;KomodoNose&quot;, the other for debugging the Komodo that is running nose &quot;Komodo&quot;)&lt;/li&gt;
&lt;li&gt;You&#039;ll need to have the Komodo remote debugging dbgp client package installed in to &quot;KomodoNose&quot;:&lt;/li&gt;
&lt;pre&gt; $ cp -r /Komodo-IDE-4.3.2/lib/support/dbgp/pythonlib/dbgp/* /KomodoNose/lib/mozilla/python/komodo/dbgp/&lt;/pre&gt;&lt;li&gt;In your python/nose function you wish to debug add the following:&lt;/p&gt;
&lt;div class=&quot;geshi-block&quot;&gt;
&lt;div class=&quot;geshifilter python&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;import&lt;/span&gt; dbgp.&lt;span style=&quot;color: black;&quot;&gt;client&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# This is port &amp;quot;Komodo&amp;quot; is listening on&lt;/span&gt;&lt;br /&gt;
dbgp.&lt;span style=&quot;color: black;&quot;&gt;client&lt;/span&gt;.&lt;span style=&quot;color: black;&quot;&gt;brk&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;host=&lt;span style=&quot;color: #483d8b;&quot;&gt;&amp;quot;localhost&amp;quot;&lt;/span&gt;, port=&lt;span style=&quot;color: #ff4500;&quot;&gt;9000&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;geshi-plain&quot;&gt;import dbgp.client
# This is port &amp;quot;Komodo&amp;quot; is listening on
dbgp.client.brk(host=&amp;quot;localhost&amp;quot;, port=9000)&lt;/pre&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;Start &quot;Komodo&quot; (or already have it running)&lt;/li&gt;
&lt;li&gt;Start &quot;KomodoNose&quot;&lt;/li&gt;
&lt;li&gt;On triggering your code in &quot;KomodoNose&quot;, &quot;Komodo&quot; should offer to start debugging and away you go (&quot;KomodoNose&quot; will become quite slow!)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Cheers,&lt;br /&gt;
Todd&lt;/p&gt;
</description>
 <pubDate>Wed, 16 Apr 2008 10:50:47 -0700</pubDate>
 <dc:creator>ToddW</dc:creator>
 <guid isPermaLink="false">comment 5058 at http://community.activestate.com</guid>
</item>
<item>
 <title>Debugging extensions?</title>
 <link>http://community.activestate.com/forum-topic/debugging-extensions</link>
 <description>&lt;p&gt;I have a particularly thorny problem with using nose under Komodo -- there is a strange behavior that causes some unit tests to pass when they shouldn&#039;t, and it&#039;s only when I use the nose API from within my extension.&lt;/p&gt;
&lt;p&gt;Is there a way to invoke pdb and step through what&#039;s happening in the nose code from within my extension? (perhaps with the Extension Developers Extension?) Or do I have to resort to logging within the nose code itself?&lt;/p&gt;
&lt;p&gt;My extension does the following in order to call nose:&lt;br /&gt;
JS code -&amp;gt; PyXPCOM code -&amp;gt; nose API&lt;/p&gt;
&lt;p&gt;Any advice/best practices welcome.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;
Brandon&lt;/p&gt;
</description>
 <comments>http://community.activestate.com/forum-topic/debugging-extensions#comments</comments>
 <category domain="http://community.activestate.com/forums/komodo-extensions-0">Komodo Macros and Extensions</category>
 <category domain="http://community.activestate.com/os/all-any">All / Any</category>
 <pubDate>Wed, 16 Apr 2008 05:08:14 -0700</pubDate>
 <dc:creator>bcorfman</dc:creator>
 <guid isPermaLink="false">2200 at http://community.activestate.com</guid>
</item>
</channel>
</rss>
