Allow 'debugSource' to be executed in user-specified environment

@jmcphers can you review? The main contentious bit is what we should do if the user passes in an environment with the base environment not available in the chain of parent environments -- I am only handling the simplest case right now, but we might want to do some more massaging of environments.