xshyne88

xshyne88

Stacktraces being cut off

I will eventually add a more specific and concrete example but first wanted some general help or advice on stacktraces.

I am currently working on an Elixir Phoenix Absinthe application that is currently in the beginning stages of production, however while in development I actually had a fair amount of trouble with stacktraces being cut off. Absinthe a lot of time seems to hog the entirety of the stack trace and its difficult for me to track where in my code the bug currently started. I’ve messed around with using rescue, debugger.start(), but these things seem less useful when I’m not exactly sure where in my code the problem arose.
I have a lot of work being done before data gets pushed back to the resolver and alot of times the resolver stack is the only thing I see when things go wirey.
I set my Phoenix config logger level to infinity and still no good. I feel like outside of explicitly rescuing or knowing right where the problem is (which is the source of my problem) I don’t know how to print a full full stack trace.

TLDR
Is there something I can do to better pinpoint where in my code something is going wrong when extenal libraries tend to take up a huge part of the stack before it gets truncated.

Most Liked

axelson

axelson

Scenic Core Team

@xshyne88 Have you configured the erlang :backtrace_depth? I believe the default is rather small (although if you use Phoenix they bump it to 20 by default).

What does this print out for you? (it returns the previous :backtrace_depth)

:erlang.system_flag(:backtrace_depth, 20)

docs: http://erlang.org/doc/man/erlang.html#system_flag-2

Also welcome to the forum! :wave:

xshyne88

xshyne88

Hi Axelson!
No I didn’t try it, or at least I don’t remember trying it. I’ll check it out. In my Iex shell it was 20. thanks for the reference I’ll post here again in a bit.

Where Next?

Popular in Questions Top

openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
vac
Hi, I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
makeitrein
Hey all, just started picking up Elixir last week and am writing a scraper as a learning project. Baby step #1 is extracting the number ...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> someth...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New

Other popular topics Top

senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
AstonJ
You’re a programmer, so you don’t need spoon feeding with the conventional drivel about “this is an integer.” No. You need to know what’s...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New

We're in Beta

About us Mission Statement