With Scala, you have all the tooling of the JVM landscape available which you can use. (for other targets like JS / NativeCode it goes in a similar direction - just use the tools that the given environment provides).
For example, you can use JDB to set breakpoints in your function and let it stop or print out something without stopping. You might want to use a graphical debugger probably.
Then, there is byteman which enables you to programmatically inject code at any point in your code.
\edit: just noticed the section on byteman’s website:
What would I use Byteman for
The simplest use of Byteman is to inject print statements that trace what your application is doing, identifying control flow through your code and displaying the values of static or instance data.
Also, see Tracing function calls for a similar topic.