Skip to content
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

skaffold debug may need to apply IDE-specific language runtime bindings #2202

Closed
briandealwis opened this issue May 30, 2019 · 10 comments
Closed
Assignees
Labels
area/debug kind/design discussion planning/Q2-21 priority/p3 agreed that this would be good to have, but no one is available at the moment.
Milestone

Comments

@briandealwis
Copy link
Member

Different IDEs may require different combinations of language runtime support packages. For example, IDEA/PyCharm does not support the Debug Adapter Protocol, so ptvsd for Python will not work out of the box. Instead it needs to use a separate package, pydevd-pycharm to enable remote debugging. And unfortunately it seems to require running some code on startup to enable.

We can maybe try to support this by a command-line specified "flavour" or "kind".

@corneliusweig
Copy link
Contributor

corneliusweig commented Jun 3, 2019

Could that be handled together with #2203? E.g.

artifacts:
- image: foobar
  runtimeType: python
  # or
  runtimeType: python-idea

@briandealwis
Copy link
Member Author

IDEs shouldn't need to modify the skaffold.yaml.

@briandealwis briandealwis added the priority/p2 May take a couple of releases label Aug 21, 2019
@tstromberg
Copy link
Contributor

Marking as stale, since it's been a while and does not appear to be on the teams priority radar. Feel free to reopen if you disagree.

@briandealwis
Copy link
Member Author

Re-opening but marking as p3 as we know it's an issue but other issues were higher priority.

@briandealwis briandealwis reopened this Apr 21, 2020
@briandealwis briandealwis added priority/p3 agreed that this would be good to have, but no one is available at the moment. and removed priority/p2 May take a couple of releases labels Apr 21, 2020
@nkubala nkubala added this to the Icebox [P2+] milestone Sep 1, 2020
@briandealwis
Copy link
Member Author

briandealwis commented Mar 1, 2021

With Delve's DAP finishing up, we'll need to support this soon. Rather than trying to maintain IDE-compatibility tables, I think it's best if the IDEs specify a list of supported protocols. For example, CC-VSC could run:

skaffold debug --protocols dap

whereas CC-IJ would run:

skaffold debug --protocols dlv,jdwp,pydevd,nodejs

Pros:

  • not IDE specific: spares Skaffold from having to maintain compatibility tables
  • if an IDE adds new support for a protocol, it can just add it to their list

Cons:

  • could become unwieldy?
  • our metrics would benefit from being able to report a specific client type

cc: @quoctruong @etanshaul @petlin

@etanshaul
Copy link
Contributor

how timely! I just wrote up: https://docs.google.com/document/d/1Dj52OayWFFa_3dBSzvt3-xWFIGLvm0oyGswRW4oV0KI, so I think we can converge on this.

@etanshaul
Copy link
Contributor

etanshaul commented Mar 1, 2021

I like how you differentiate between DAP and everything else. Though the slight oddity is that for some runtimes (like Java), afaik the set of transforms for say dap vs jdwp will be identical.

Also, I wonder if there is ever a case where we'd want to support a mix of DAP and non-DAP protocols in a single invocation (e.g. backwards compatibility with older versions of VSC, pre-Go-DAP)

could become unwieldy?

How do you figure this? Do you mean because JB has to manually specificy all of the individual protocols?

@nkubala
Copy link
Contributor

nkubala commented Mar 8, 2021

could become unwieldy?

seems like a small price to pay for the flexibility this grants, otherwise we're going to have to coordinate on both sides every time a new debug protocol is added.

my only question is, what happens when two separate protocols for the same language are provided? we can't use both at the same time, so would we select arbitrarily or fail out?

@etanshaul
Copy link
Contributor

my only question is, what happens when two separate protocols for the same language are provided? we can't use both at the same time, so would we select arbitrarily or fail out?

I think we should default to DAP unless specified. I updated the referenced design above with this proposal.

@briandealwis
Copy link
Member Author

This was fixed by #5759 — thanks @matthewmichihara!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/debug kind/design discussion planning/Q2-21 priority/p3 agreed that this would be good to have, but no one is available at the moment.
Projects
None yet
Development

No branches or pull requests

7 participants