# How to show the interpolated expression in metaprogramming

**URL:** <https://discourse.julialang.org/t/how-to-show-the-interpolated-expression-in-metaprogramming/2060>\
**Category:** New to Julia\
**Created:** [February 12, 2017, 12:46pm UTC](https://discourse.julialang.org/t/how-to-show-the-interpolated-expression-in-metaprogramming/2060 "2017-02-12T12:46:00Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![chobbes](https://avatars.discourse-cdn.com/v4/letter/c/848f3c/32.png) [@chobbes](https://discourse.julialang.org/u/chobbes)\
**Post date:** [February 12, 2017, 1:50pm UTC](https://discourse.julialang.org/t/how-to-show-the-interpolated-expression-in-metaprogramming/2060/3 "2017-02-12T13:50:13Z")

</div>

Thanks for the comments. Unfortunately, it doesn’t work. Here is the error:

```julia
1|julia > println($op)
ERROR: UndefVarError: op not defined
 in _step_expr(::ASTInterpreter.Interpreter) at /home/chobbes/.julia/v0.5/ASTInterpreter/src/ASTInterpreter.jl:653
 in step_expr at /home/chobbes/.julia/v0.5/ASTInterpreter/src/ASTInterpreter.jl:666 [inlined]
 in #finish!#81(::Bool, ::Bool, ::Function, ::ASTInterpreter.Interpreter) at /home/chobbes/.julia/v0.5/ASTInterpreter/src/ASTInterpreter.jl:1720
 in eval_in_interp(::ASTInterpreter.Interpreter, ::Expr, ::JuliaParser.Tokens.SourceExpr, ::String) at /home/chobbes/.julia/v0.5/ASTInterpreter/src/ASTInterpreter.jl:1298
 in eval_code(::ASTInterpreter.InterpreterState, ::String) at /home/chobbes/.julia/v0.5/ASTInterpreter/src/ASTInterpreter.jl:1529
 in (::ASTInterpreter.##72#78{ASTInterpreter.InterpreterState,Base.LineEdit.Prompt})(::Base.LineEdit.MIState, ::Base.AbstractIOBuffer{Array{UInt8,1}}, ::Bool) at /home/chobbes/.julia/v0.5/ASTInterpreter/src/ASTInterpreter.jl:1654
 in run_interface(::Base.Terminals.TTYTerminal, ::Base.LineEdit.ModalInterface) at ./LineEdit.jl:1579
 in RunDebugREPL(::ASTInterpreter.Interpreter) at /home/chobbes/.julia/v0.5/ASTInterpreter/src/ASTInterpreter.jl:1693

```

Apparently, interpolation doesn’t work this way in debugger.

I think if `println($op) works, `$op should have worked too.

---

_[View the full topic](https://discourse.julialang.org/t/how-to-show-the-interpolated-expression-in-metaprogramming/2060)._
