Handle side effects during browser
dgkf opened this issue · comments
Since browser
is currently executed in a forked process side effects will not take effect in the user's REPL.
This includes setting global variables from within the browser prompt, or working with the return value of the function call that was being debugged.
Well this problem seems to be resolving itself nicely.
I had an awful time trying to get browser()
to run in a child process in a way that can still step through the code. But by swapping the roles of the two processes, and running browser()
in the parent process, we solve both problems at once.
The downside is that this requires some gnarly redirection of stdout
in the parent process, so I'll need to be sure it can be restored.