Skip to content

Comments

Add support for starting debugged application without waiting for a debugger to attach#1563

Open
nkvoll wants to merge 2 commits intoko-build:mainfrom
nkvoll:add-delve-debug-continue
Open

Add support for starting debugged application without waiting for a debugger to attach#1563
nkvoll wants to merge 2 commits intoko-build:mainfrom
nkvoll:add-delve-debug-continue

Conversation

@nkvoll
Copy link

@nkvoll nkvoll commented Sep 11, 2025

In an automated workflow, I'm building multiple images and deploying them to K8s. I would still like to be able to attach a debugger.

However, this currently surfaces some problems:

  1. Every time I rebuild, I need to attach a debugger for the deploy to complete successfully. Since I often deploy more than one container, the number of debuggers I need to restart may be >1, and this becomes cumbersome to juggle locally.
  2. If I don't need breakpoints to be set for initialization / start-up code, requiring a debugger attachment before starting just slows down deployment/start-up/iteration time.

Delve supports a --continue flag, which lets the application start without waiting, and I can (optionally) connect a debugger at any later point in the lifecycle. This PR exposes this via a --debug-continue flag. I was considering adding some more general --delve-opts="--continue ..." flag, but I wasn't sure whether that would be worth the effort / desirable, so I opted for this simpler approach. Let me know what you think :)

@github-actions
Copy link

This Pull Request is stale because it has been open for 90 days with
no activity. It will automatically close after 30 more days of
inactivity. Keep fresh with the 'lifecycle/frozen' label.

@nkvoll
Copy link
Author

nkvoll commented Dec 16, 2025

I still think this is relevant, and I don't have FOSSA access to check what the licence compliance issues would be all about - I don't expect any licensing to be changed by this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant