<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="171473" data-post-id="171473">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="mike_bianco" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mike_bianco/120/16307_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  mike_bianco
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<blockquote>
<p>But a macro that processes the entire module can modify it.</p>
</blockquote>
<p>Would it be possible to write a macro which processes every module loaded to override <code>try</code> to include this debugging information?</p>
<p>I still find this one of the most parts of ruby I miss once. For instance, if I’m running a test and it’s failing due to a function deep in the stack I would <em>love</em> to know what arguments were passed to that function so I can quickly debug what might be happening higher in the stack.</p>
<p>In ruby, I can just inspect the args and quickly modify the code. In elixir I have to add pry to the right place in the stack that I control, rerun the tests, and hope that I placed the debugger in the correct spot.</p>
<p>I think adding this feature to elixir (in dev/test mode only) would be <em>amazing</em> and be an incredible help to users.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="171473" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/help-an-elixir-beginner-find-missing-development-tooling/24632/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-171473" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="171473"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #21"></div>
  </section>
</div>
    <div class="postbit" id="171503" data-post-id="171503">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="hauleth" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/hauleth/120/18942_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  hauleth
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="mike_bianco" data-post="22" data-topic="24632">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mike_bianco/48/16307_2.png" class="avatar"> mike_bianco:</div>
<blockquote>
<p>I would <em>love</em> to know what arguments were passed to that function so I can quickly debug what might be happening higher in the stack.</p>
</blockquote>
</aside>
<p>Just use <a href="http://www.erlang.org/doc/man/trace%2F3" rel="nofollow"><code>erlang:trace/3</code></a> or <a href="http://www.erlang.org/doc/man/dbg.html" rel="nofollow"><code>dbg</code></a>. Due to the nature of Erlang the frame of the failed code do not exists anymore, so you cannot get any more information that is showed by the VM, you need to fall back to other features - tracing is one of them. This can be shown for example in form of:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">Task.async(fn -&gt; 1 + :a end)
</code></pre>
<p>It has no information from where it was called at all, so you will have no information where the error came from other than it come from the new process.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="171503" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/help-an-elixir-beginner-find-missing-development-tooling/24632/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-171503" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="171503"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #22"></div>
  </section>
</div>
    <div class="postbit" id="171510" data-post-id="171510">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="mike_bianco" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mike_bianco/120/16307_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  mike_bianco
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/hauleth" rel="nofollow">@hauleth</a> Where can I find more information about using trace/dbg? How can I can debug a piece of code I don’t own (pulled in by mix deps)? Thanks!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="171510" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/help-an-elixir-beginner-find-missing-development-tooling/24632/24">Post #23</a>
	                </div>
	            </div>
              <div id="likers-container-171510" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="171510"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #23"></div>
  </section>
</div>
    <div class="postbit" id="171513" data-post-id="171513">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="hauleth" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/hauleth/120/18942_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  hauleth
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>In the <a href="http://www.erlang.org/doc/man/dbg.html" rel="nofollow">Erlang docs</a>. Yes, you can trace (almost) all Erlang function calls (some BIFs aren’t traceable for performance reasons, but there is only few of them).</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="171513" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/help-an-elixir-beginner-find-missing-development-tooling/24632/25">Post #24</a>
	                </div>
	            </div>
              <div id="likers-container-171513" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="171513"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>