What are your favorite println debugger messages?

question

#1

For those who still haven’t gotten on the Holy Rebugger train, what are your favorite println messages?

// asking to spice up my debugging game

println(111)
println(222)
println(333)
println(444)
println(555)
println(777)
println("woof")
println("meow")
println("bark")
println("asdf")
println("qwer")
println("zxcv")
println("hmmm")
println("ok")
println("no wai")
println("wot?")

#2

Usually println("Here"), println("Here2") etc…


#3

Another good one is

println("Please don't break again")

#4
println(@__LINE__)

#5

Cool, learned something very useful today… :sunglasses:


#6

While thinking about this, is there a way to easily add the function name programmatically into println(@__LINE__)?


#7

Not the function, no, but the file name could be included like this:

println(@__FILE__, ":", @__LINE__)

It would be possible to have a similar @__FUNCTION__ macro. Implementing it would require tracking the name of the function that is currently being defined in the parser. And of course, one must keep in mind inner functions so technically there is a stack of function names that are currently being defined at any point in code.


#8

Thanks!


#9
@show something

#10

The same, but in polish.


#11

Can we ask pretty please for that feature? :slight_smile:


#12

Until that’s implemented you can just use`e.g.

st = stacktrace()
println(st)

in your function call.


#13

I often use @show x; error(msg) to show x and then give me a stacktrace without much noise from other debugging lines.


#14

Feel like a jedi while debugging:

println("hello there")


#15

For a video game theme, I use:

println("wow")
println("lol")
println("kek")

println("!")
println("?")

println("SNAKE")
println("moo")

// although I guess println(@__FILE__, ":", @__LINE__) is kind of useful :stuck_out_tongue: