-
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 .NET Core container debugging support #4699
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4699 +/- ##
==========================================
+ Coverage 73.38% 73.42% +0.04%
==========================================
Files 341 342 +1
Lines 13505 13529 +24
==========================================
+ Hits 9910 9934 +24
Misses 2976 2976
Partials 619 619
Continue to review full report at Codecov.
|
Very cool @MrLuje! I'll get to reviewing this today. |
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.
This looks great! Just a few nits to take care of and we can commit it.
"type": "coreclr", | ||
"request": "attach", | ||
"processId" : "${command:pickRemoteProcess}", // if your docker image doesn't contain `ps`, this command will fail... usually processId is 1 | ||
"justMyCode": true, //dotnet debug=true,dotner release=false |
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.
I'm not sure what this comment means.
"justMyCode": true, //dotnet debug=true,dotner release=false | |
"justMyCode": true, // for dotnet debug set to `true`, for release set to `false` |
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.
It is a well-known debugging option in .net world
The debugger displays and steps into user code ("My Code") only, ignoring system code and other code that is optimized or that does not have debugging symbols. (from msdn)
What about :
"justMyCode": true, // set to true
in debug and false
in release configuration
"name": "Skaffold Debug", | ||
"type": "coreclr", | ||
"request": "attach", | ||
"processId" : "${command:pickRemoteProcess}", // if your docker image doesn't contain `ps`, this command will fail... usually processId is 1 |
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.
Might be better to use "1"
and add some discussion above or below about use of command:pickRemoteProcess
.
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.
Done & added the discussion to the text above
integration/testdata/debug/netcore/src/HelloWorld/HelloWorld.csproj
Outdated
Show resolved
Hide resolved
@MrLuje will you have a chance to make these minor fixes? |
Done, you can check the fixes |
Just pushed some tiny tweaks (minor edits and line-wrap in docs, and changed copyright year to 2020). |
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.
Thanks for your contribution!
Fixes: #2175
Description
This patch adds support to skaffold for .NET Core debugging.
.NET Core requires additional debugging runtime support files, which are fetched and installed using an initContainer base.
I used the already existing debugging runtime support at https://github.com/GoogleContainerTools/container-debug-support/tree/duct-tape/netcore that makes
vsdbg
available.The debugger must be started by kubectl "execing" vsdbg on the container (usually, from your IDE)
No transformation is needed for the container command & args
vsdbg
doesn't expose any debugging port to the existing container.This can be tested using Visual Studio Code, I hope the doc changes are clear enough for the test steps.
FYI, I never used buildpacks before this PR, so this part may needs extra attention.