<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Debugging on Living Systems_</title>
    <link>https://livesys.se/tags/debugging/</link>
    <description>Recent content in Debugging on Living Systems_</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 04 Mar 2024 14:42:00 +0100</lastBuildDate>
    <atom:link href="https://livesys.se/tags/debugging/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Debugging inside Jinja templates using pdb/ipdb</title>
      <link>https://livesys.se/posts/debugging-inside-jinja-templates-using-pdb-ipdb/</link>
      <pubDate>Mon, 04 Mar 2024 14:42:00 +0100</pubDate>
      <guid>https://livesys.se/posts/debugging-inside-jinja-templates-using-pdb-ipdb/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m working on a static reporting tool using the Jinja2 templating&#xA;engine for Python.&lt;/p&gt;&#xA;&lt;p&gt;I was trying to figure out a way to enter into the Jinja templating code&#xA;with the pdb/ipdb commandline debugger.&lt;/p&gt;&#xA;&lt;p&gt;I tried creating an &lt;code&gt;.ipdbrc&lt;/code&gt; file in my local directory with the line:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;path/to/template.html:&amp;lt;lineno&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&amp;hellip; but that didn&amp;rsquo;t work.&lt;/p&gt;&#xA;&lt;p&gt;What worked was to figure out &lt;a href=&#34;https://github.com/pallets/jinja/blob/main/src/jinja2/environment.py#L1301&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;the line that&#xA;says&lt;/a&gt;&#xA;:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;return self.environment.concat(self.root_render_func(ctx))&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&amp;hellip; inside the the jinja codebase, and put a breakpoint on that (which&#xA;for me was on line 1299, but might vary depending on version):&lt;/p&gt;</description>
    </item>
    <item>
      <title>Troubleshooting Nextflow pipelines</title>
      <link>https://livesys.se/posts/troubleshooting-nextflow-pipelines/</link>
      <pubDate>Wed, 01 Nov 2023 11:47:00 +0100</pubDate>
      <guid>https://livesys.se/posts/troubleshooting-nextflow-pipelines/</guid>
      <description>&lt;!-- raw HTML omitted --&gt;&#xA;&lt;p&gt;We have been evaluating Nextflow before in my work at&#xA;&lt;a href=&#34;https://pharmb.io&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;pharmb.io&lt;/a&gt;&#xA;, but that was before&#xA;&lt;a href=&#34;https://www.nextflow.io/docs/latest/dsl1.html&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;DSL2&lt;/a&gt;&#xA; and the support&#xA;for re-usable modules (which was one reason we needed to develop our own&#xA;tools to support our challenges, as explained &lt;a href=&#34;https://doi.org/10.1093/gigascience/giz044&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;in the&#xA;paper&lt;/a&gt;&#xA;). Thus, there&amp;rsquo;s&#xA;definitely some stuff to get into.&lt;/p&gt;&#xA;&lt;p&gt;Based on my years in bioinformatics and data science, I&amp;rsquo;ve seen that&#xA;the number one skill that you need to develop is to be able to&#xA;effectively troubleshoot things, because things will invariably fail in&#xA;all kinds of ways. And in the process, you will probably learn a lot&#xA;about the technology stack you are using.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
