Skip to content

Commit 682e542

Browse files
committed
Don't wait for debugger in daemon mode
When debugging an integration test that involves some behind-the-scenes rebasing, the daemon lazygit would also wait for a debugger to attach. This is very confusing because the test seems to hang; once you figured out what's going on, it's inconvenient because you need to attach a debugger to the daemon every time you debug the test. Now, it would sometimes be useful to be able to debug the daemon itself (whether inside an integration test, or during normal usage), and I have often wished to be able to do that. We might introduce an additional env var (and command-line option?) to enable this; but that's out of scope here.
1 parent 89ba3f2 commit 682e542

File tree

1 file changed

+1
-1
lines changed
  • pkg/integration/clients/injector

1 file changed

+1
-1
lines changed

pkg/integration/clients/injector/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func main() {
3131

3232
integrationTest := getIntegrationTest()
3333

34-
if os.Getenv(components.WAIT_FOR_DEBUGGER_ENV_VAR) != "" {
34+
if os.Getenv(components.WAIT_FOR_DEBUGGER_ENV_VAR) != "" && !daemon.InDaemonMode() {
3535
println("Waiting for debugger to attach...")
3636
for !isDebuggerAttached() {
3737
time.Sleep(time.Millisecond * 100)

0 commit comments

Comments
 (0)