For quick debugging it is sometimes useful to start a REPL from a script at a certain break-point. I have found out that I can start the Torch REPL at any point by:
require "trepl"
repl()
The only problem with this approach is that the REPL does not see any local variables from the calling chunk. Without being able to inspect locals, the REPL is not really useful as a debugger.
Is it possible to start a REPL which has access to local variables?
Disclaimer: I have found my own (newbie) solution to this problem, but I'm always open for alternatives/suggestions.