panicwrap icon indicating copy to clipboard operation
panicwrap copied to clipboard

Ability to easily disable panicwrap for debugging

Open wholroyd opened this issue 10 years ago • 3 comments

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().

wholroyd avatar Jan 05 '16 14:01 wholroyd

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?)

Groxx avatar May 17 '17 02:05 Groxx

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.

ryanaslett avatar May 25 '17 08:05 ryanaslett

Terraform itself now responds to the environment variable TF_FORK=0 to disable its attempts to use panicwrap.

apparentlymart avatar Feb 21 '18 19:02 apparentlymart