# Can you get a deeper look into an \`include\` catch\_stacktrace()?

**URL:** <https://discourse.julialang.org/t/can-you-get-a-deeper-look-into-an-include-catch-stacktrace/7703>\
**Category:** General Usage\
**Tags:** question\
**Created:** [December 12, 2017, 9:43am UTC](https://discourse.julialang.org/t/can-you-get-a-deeper-look-into-an-include-catch-stacktrace/7703 "2017-12-12T09:43:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![djsegal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/djsegal/32/13752_2.png) [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Post date:** [December 12, 2017, 9:43am UTC](https://discourse.julialang.org/t/can-you-get-a-deeper-look-into-an-include-catch-stacktrace/7703/1 "2017-12-12T09:43:54Z")

</div>

If you do something like:

```julia
include("file_with_missing_dependency.jl")

```

you get a warning like:

```julia
ERROR: LoadError: LoadError: UndefVarError: SomeUnloadedVar not defined
Stacktrace:
 [1] include_from_node1(::String) at ./loading.jl:569
 [2] include(::String) at ./sysimg.jl:14
 ... // wherever you called include from

```

* * *

If you wrap the `include()` in a `try-catch`, you get some more information, namely:

```julia
cur_error = {
    "file" => "/Users/.../file_with_missing_dependency.jl",
    "line" => 42, # whatever line has "SomeUnloadedVar"
    "error" => {
        "var" => :SomeUnloadedVar
    }
}

```

* * *

Is there a way to get the stacktrace inside the file being loaded?

Like exactly how nested is that `42`.

Is it relatively decoupled like this:

```julia
41
42 dummy_var = SomeUnloadedVar.rand()
43

```

or the much more tangled scenario:

```julia
30 for i in 1:10
... dummy_var = ( 1 + 
41 SomeUnloadedVar.rand()
42 )
43 ... 

```

* * *

summarizing. would it be possible to find the line value of `30` in the above code block?

// using existing debugging tools
