Ability to easily disable panicwrap for debugging
I want to launch Terraform under a debugger. Currently I end up debugging a process that does nothing than spawns another Terraform instance, so I get nothing. There should be a way to let panicwrap know that I want it temporarily disabled other than having to comment out imports and almost all of the realMain().
Seems like this could be handled with a command-line flag without too much trouble?
like:
import "flag"
wrap := flag.Bool("wrap", false, "if true, launch with panicwrap")
flag.Parse()
if *wrap {
// panicwrap
} else {
// don't
}
(I haven't tried yet, but I likely will soon. I assume this works?)
Yes. This would be good. I just spent a good deal of time trying to sort out why my debugger wouldnt stop at any breakpoints. Now I understand why.
Terraform itself now responds to the environment variable TF_FORK=0 to disable its attempts to use panicwrap.