# Problem with @enter when using Debugger.jl in VS Code console

**URL:** https://discourse.julialang.org/t/problem-with-enter-when-using-debugger-jl-in-vs-code-console/47830
**Category:** VS Code
**Tags:** question
**Created:** [October 6, 2020, 3:37am UTC](https://discourse.julialang.org/t/problem-with-enter-when-using-debugger-jl-in-vs-code-console/47830 "2020-10-06T03:37:11Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![aachener](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aachener/32/18112_2.png) [@aachener](https://discourse.julialang.org/u/aachener)
#### Post date: [October 6, 2020, 3:37am UTC](https://discourse.julialang.org/t/problem-with-enter-when-using-debugger-jl-in-vs-code-console/47830/1 "2020-10-06T03:37:11Z")

</div>

Hi, everyone,

I am using Debugger.jl in VS Code REPL. It seems that there is a problem of the @enter macro, as following code shows:

```julia

julia> using Debugger

julia> foo(x) = x^2
foo (generic function with 1 method)

julia> @enter foo(2)
ERROR: UndefVarError: @enter not defined
Stacktrace:
 [1] top-level scope
 [2] include_string(::Function, ::Module, ::String, ::String) 
at .\loading.jl:1088

julia> 

```

I am using Julia 1.5.1 and Debugger version 0.6.6

How could I avoid this error message and use Debugger in VS Code REPL?

---

<div class="post-metadata">

### Author: ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)
#### Post date: [October 6, 2020, 9:18pm UTC](https://discourse.julialang.org/t/problem-with-enter-when-using-debugger-jl-in-vs-code-console/47830/2 "2020-10-06T21:18:06Z")

</div>

Just omit the `using Debugger` and you’ll use VSCode’s visual debugger.

If you prefer the text-based debugger then do:

```julia
import Debugger
Debugger.@enter foo(2)

```

This avoids the collision with `VSCodeServer.@enter` (which is exported too).

---

<div class="post-metadata">

### Author: ![aachener](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aachener/32/18112_2.png) [@aachener](https://discourse.julialang.org/u/aachener)
#### Post date: [October 7, 2020, 1:41am UTC](https://discourse.julialang.org/t/problem-with-enter-when-using-debugger-jl-in-vs-code-console/47830/3 "2020-10-07T01:41:32Z")

</div>

Thank you Tim, perfect explanation! Help me a lot since I’ve struggled with Debugger for long time.

---

<div class="post-metadata">

### Author: ![Volker](https://avatars.discourse-cdn.com/v4/letter/v/77aa72/32.png) [@Volker](https://discourse.julialang.org/u/Volker)
#### Post date: [January 17, 2021, 10:15am UTC](https://discourse.julialang.org/t/problem-with-enter-when-using-debugger-jl-in-vs-code-console/47830/4 "2021-01-17T10:15:04Z")

</div>

Is it possible to use `Debugger.@enter` so that I can navigate with the gui of vs code and the variable explorer? My use case is that I would like to evaluate a several lines of code in a script with `Julia: Execute Code Block` (Alt+Enter) and then just would like to debug a specific function, which arguments depend on the code evaluated ahead.

---

<div class="post-metadata">

### Author: ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)
#### Post date: [January 17, 2021, 11:19am UTC](https://discourse.julialang.org/t/problem-with-enter-when-using-debugger-jl-in-vs-code-console/47830/5 "2021-01-17T11:19:52Z")

</div>

No, but you can just use the exported `@enter` available in the integrated REPL instead.

---

<div class="post-metadata">

### Author: ![Volker](https://avatars.discourse-cdn.com/v4/letter/v/77aa72/32.png) [@Volker](https://discourse.julialang.org/u/Volker)
#### Post date: [January 27, 2021, 11:47am UTC](https://discourse.julialang.org/t/problem-with-enter-when-using-debugger-jl-in-vs-code-console/47830/6 "2021-01-27T11:47:51Z")

</div>

For me `@enter` isn´t defined, but maybe I use the wrong REPL. However, `VSCodeServer.@enter` works for me.

---

<div class="post-metadata">

### Author: ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)
#### Post date: [January 28, 2021, 10:12am UTC](https://discourse.julialang.org/t/problem-with-enter-when-using-debugger-jl-in-vs-code-console/47830/7 "2021-01-28T10:12:53Z")

</div>

That’s probably because you said `using Debugger` and the conflict between the two definitions of `@enter` meant that neither was available. Just don’t say `using Debugger`.

---

<div class="post-metadata">

### Author: ![Volker](https://avatars.discourse-cdn.com/v4/letter/v/77aa72/32.png) [@Volker](https://discourse.julialang.org/u/Volker)
#### Post date: [February 9, 2021, 8:00am UTC](https://discourse.julialang.org/t/problem-with-enter-when-using-debugger-jl-in-vs-code-console/47830/8 "2021-02-09T08:00:30Z")

</div>

Sorry, I forgot to answer. You´re right. I used `using Debugger` inside the startup.jl-file
