# Set a breakpoint in the custom module

**URL:** <https://discourse.julialang.org/t/set-a-breakpoint-in-the-custom-module/22823>\
**Category:** General Usage\
**Tags:** debug\
**Created:** [April 5, 2019, 11:09pm UTC](https://discourse.julialang.org/t/set-a-breakpoint-in-the-custom-module/22823 "2019-04-05T23:09:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mzhenirovskyy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mzhenirovskyy/32/7549_2.png) [@mzhenirovskyy](https://discourse.julialang.org/u/mzhenirovskyy)\
**Post date:** [April 5, 2019, 11:09pm UTC](https://discourse.julialang.org/t/set-a-breakpoint-in-the-custom-module/22823/1 "2019-04-05T23:09:56Z")

</div>

I want to set up breakpoint in the custom module.

My module is in the file “utils.jl”:

```julia
using Revise
using Debugger

module Utils

export myfunc2

function myfunc2(x)
    x = x .^2
    @bp
    x = x .+ 3
end

end

```

When I run it from here:

```julia
using Revise
using Debugger

include("utils.jl")

using .Utils

@run myfunc2([1. 2.])

```

I get an error:

```julia
ERROR: LoadError: LoadError: LoadError: UndefVarError: @bp not definedStacktrace:
 [1] top-level scope [2] include at .\boot.jl:326 [inlined] [3] include_relative(::Module, ::String) at .\loading.jl:1038
 [4] include(::Module, ::String) at .\sysimg.jl:29 [5] include(::String) at .\client.jl:403 [6] top-level scope at none:0
 [7] include at .\boot.jl:326 [inlined]
 [8] include_relative(::Module, ::String) at .\loading.jl:1038
 [9] include(::Module, ::String) at .\sysimg.jl:29
 [10] include(::String) at .\client.jl:403
 [11] top-level scope at none:0
in expression starting at d:\Playground\julia-experiment\JuliaDebugging\utils.jl:10
in expression starting at d:\Playground\julia-experiment\JuliaDebugging\utils.jl:8
in expression starting at d:\Playground\julia-experiment\JuliaDebugging\main.jl:4

```

If I do everything in one file, I don’t have any errors.  
E.g:

```julia
using Revise
using Debugger

function myfunc1(x)
    x = x .^4
    @bp
    x = x .+ 13
end

@run myfunc1([1. 2.])

```

Any idea how can I setup breakpoint in the different file?

---

<div class="post-metadata">

**Author:** ![mzhenirovskyy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mzhenirovskyy/32/7549_2.png) [@mzhenirovskyy](https://discourse.julialang.org/u/mzhenirovskyy)\
**Post date:** [April 8, 2019, 3:58pm UTC](https://discourse.julialang.org/t/set-a-breakpoint-in-the-custom-module/22823/2 "2019-04-08T15:58:00Z")

</div>

I’ve solved this issue. I need to move the statement “using Debugger” to the inside of the imported module.

```julia
module Utils

using Debugger

export myfunc2

function myfunc2(x)
    x = x .^2
    @bp
    x = x .+ 3
end

end

```
