In DrRacket, the "preserve stack trace" button actually corresponds to a
mode in the compiler that disables some optimizations [*]. The radio
buttons at the top (specifically the debugging one) control errortrace.

Robby

[*]
https://docs.racket-lang.org/reference/eval.html?q=Compile#%28def._%28%28quote._~23~25kernel%29._compile-context-preservation-enabled%29%29


On Wed, Jul 24, 2019 at 10:43 AM Alex Harsanyi <alexharsa...@gmail.com>
wrote:

> If you are using DrRacket, you can go to the "Language/Choose Language..."
> menu, click on "Show Details", than make sure the "Preserve Stack Trace"
> checkbox is ticked.
>
> If you are using racket-mode in Emacs, you can evaluate the current buffer
> using "C-u F5" which will do the same thing.
>
> If you use racket from the command line, I think you can run it as:
>
>     racket -l errortrace -l racket -i
>
> Hope this helps,
> Alex.
>
> On Wednesday, July 24, 2019 at 9:45:47 AM UTC+8, Anthony Quizon wrote:
>>
>> I've been trying to find a way to get better error messages in the racket
>> repl via the command line.
>> Specifically, better stack traces. At the moment, if you load a file in
>> the repl via ',enter' it doesn't give you any information about the line
>> number for errors.
>>
>> I've looked around in the users group but could only find:
>> racket -l errortrace -t <filename>.rkt
>>
>> This is pretty much what I'm looking for except that it only lets me use
>> this once and non-interactively.
>>
>> Is there an option in the (x)repl that lets me use errortrace
>> interactively for each input?
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/4cd2db48-0520-4d4b-b144-83b1e7badc1c%40googlegroups.com
> <https://groups.google.com/d/msgid/racket-users/4cd2db48-0520-4d4b-b144-83b1e7badc1c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAL3TdONYvPQ1qEOZ%3DK954wm1nAPGti1Fy8A53m1LmVE9B2o1Xg%40mail.gmail.com.

Reply via email to