# Is it possible to dump segfault stack trace from REPL-only crash?

**URL:** <https://discourse.julialang.org/t/is-it-possible-to-dump-segfault-stack-trace-from-repl-only-crash/65172>\
**Category:** General Usage\
**Tags:** debug\
**Created:** [July 23, 2021, 1:02pm UTC](https://discourse.julialang.org/t/is-it-possible-to-dump-segfault-stack-trace-from-repl-only-crash/65172 "2021-07-23T13:02:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ianfiske](https://avatars.discourse-cdn.com/v4/letter/i/58f4c7/32.png) [@ianfiske](https://discourse.julialang.org/u/ianfiske)\
**Post date:** [July 23, 2021, 1:02pm UTC](https://discourse.julialang.org/t/is-it-possible-to-dump-segfault-stack-trace-from-repl-only-crash/65172/1 "2021-07-23T13:02:43Z")

</div>

I ran into this issue [https://github.com/julia-vscode/julia-vscode/issues/2299](https://github.com/julia-vscode/julia-vscode/issues/2299) that can only be reproduced in the REPL (one that’s connected to VS Code). I am trying to obtain a useful dump from the segfault following [Reporting and analyzing crashes (segfaults) · The Julia Language](https://docs.julialang.org/en/v1/devdocs/backtraces/). However, the line

```julia
$ gdb --args usr/bin/julia-debug <path_to_your_script>

```

requires a script to be run. Is it possible to use gdb with the julia REPL instead of a script so that I can debug the above issue?

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [July 23, 2021, 1:18pm UTC](https://discourse.julialang.org/t/is-it-possible-to-dump-segfault-stack-trace-from-repl-only-crash/65172/2 "2021-07-23T13:18:53Z")

</div>

Might be possible to try using the ability to produce an rr trace with `--bug-report=rr` which will upload the trace to S3 or `--bug-report=rr-local` which will save it to a local file. That will only work on Linux, however, which may not be helpful to you.

---

<div class="post-metadata">

**Author:** ![ianfiske](https://avatars.discourse-cdn.com/v4/letter/i/58f4c7/32.png) [@ianfiske](https://discourse.julialang.org/u/ianfiske)\
**Post date:** [July 23, 2021, 2:57pm UTC](https://discourse.julialang.org/t/is-it-possible-to-dump-segfault-stack-trace-from-repl-only-crash/65172/3 "2021-07-23T14:57:23Z")

</div>

Thank you for the suggestion, though as you hinted it won’t work for me (I’m on OSX).

I did manage to attach `lldb` to a running REPL process, so I think there’s a path forward that way.

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [July 23, 2021, 4:41pm UTC](https://discourse.julialang.org/t/is-it-possible-to-dump-segfault-stack-trace-from-repl-only-crash/65172/4 "2021-07-23T16:41:11Z")

</div>

Yeah, you can absolutely attach a debugger to a REPL process. Good luck!
