-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Python debugging support #2205
Add Python debugging support #2205
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2205 +/- ##
==========================================
+ Coverage 58.6% 59.06% +0.45%
==========================================
Files 188 189 +1
Lines 7805 7924 +119
==========================================
+ Hits 4574 4680 +106
- Misses 2859 2866 +7
- Partials 372 378 +6
Continue to review full report at Codecov.
|
pkg/skaffold/debug/transform.go
Outdated
} | ||
} | ||
if len(supportFilesRequired) > 0 { | ||
logrus.Infof("Configuring installation of debugging support files") | ||
supportVolume := v1.Volume{Name: "debugging-support-files", VolumeSource: v1.VolumeSource{EmptyDir: &v1.EmptyDirVolumeSource{}}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"debugging-support-files" is used on multiple lines. Extract to constant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some stuff to clarify things for me?
PTAL @loosebazooka @ILMTitan |
@quoctruong PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some language stuff I'm not sure about, feel free to ignore or whatever.
Also might be worth doing a ux study with the team to see if we can all follow the instructions 🛩️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Re Approvals: you had changes in a main util file hence our review was required. Also more "debug" related files were changed for integration testing that weren't owned by you, so I added those to the CODEOWNERS in #2292
This patch adds support to
skaffold debug
for Python 2.7 and 3.x debugging. Python requires additional debugging runtime support files, which are fetched and installed using aninitContainer
base.These debugging runtime support files are installed via
initContainers
from images defined in https://github.com/GoogleContainerTools/container-debug-support/. These images are currently manually pushed togcr.io/gcp-dev-tools/duct-tape/XXX
where XXX is a runtime-specific identifier likepython
(supports both Python 2.7 and 3.7).The Python image installs the
ptvsd
module, a wrapper that uses the IDE/editor-agnostic debug adapter protocol (DAP). This protocol has become a de facto standard for interacting with remote runtimes.Manual Testing
For manual testing, you'll need to use VS Code or Eclipse with LSP4e, or some other editor that supports the DAP. I had to launch my debug session with the following launch parameters, to map the local file system to the remote file system in the container:
The debugger is on port 5678.
Fixes #2173