Use `@__LINE__` and `@__FILE__`. (note, however, `@__LINE__` does not work when used within another macro, see https://github.com/JuliaLang/julia/issues/9577)
On Tue, May 10, 2016 at 6:25 AM, FANG Colin <colinf...@gmail.com> wrote: > Currently I am using > > macro markup(line_number) > println("compile time OK: #$(line_number)") > quote > x = $(esc(line_number)) > println("run time OK: #$x") > end > end > > For example > > I want to debug a function "to_debug". > > function to_debug() > @markup(1) > end > > compile time OK: #1 > > > to_debug() > > > run time OK: #1 > > > > > > > > > On Tuesday, May 10, 2016 at 11:16:20 AM UTC+1, FANG Colin wrote: >> >> I am debugging some code. >> >> I would like to insert some markup function/macro in my code, so that I >> know my code at least works fine until certain line number .... >> >