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

Change debugger to support the new json protocol implemented in PTVSD #1018

Closed
DonJayamanne opened this Issue Jun 13, 2017 · 8 comments

Comments

Projects
None yet
4 participants
@DonJayamanne
Owner

DonJayamanne commented Jun 13, 2017

This is a big an critical change, affects almost all remote debugging instances.
As a temporary solution please use PTVSD version 3.0 until this extension is updated to support the latest version of PTVSD package.

#1011
#805
#999
#981
#971

@DonJayamanne

This comment has been minimized.

Show comment
Hide comment
@DonJayamanne

DonJayamanne Jun 15, 2017

Owner

@zooba Version 3.0 of PTVSD python library has some significant changes. My extension still uses the old mechanism of communication, using the binary messages. Version 3.0 uses IPC JSON.

Looking at the .NET and the Python code in PTVS, I can see some members in code containing the words "Legacy". This seems to indicate that there's some backwards compatibility or the like. Is that correct?

Is it possible for me to use the new PTVSD 3.0 library using purely IPC JSON.

Owner

DonJayamanne commented Jun 15, 2017

@zooba Version 3.0 of PTVSD python library has some significant changes. My extension still uses the old mechanism of communication, using the binary messages. Version 3.0 uses IPC JSON.

Looking at the .NET and the Python code in PTVS, I can see some members in code containing the words "Legacy". This seems to indicate that there's some backwards compatibility or the like. Is that correct?

Is it possible for me to use the new PTVSD 3.0 library using purely IPC JSON.

@zooba

This comment has been minimized.

Show comment
Hide comment
@zooba

zooba Jun 15, 2017

Our long-term plan is to make ptvsd's messages match VS Code, so that any shim should be very minimal. (And we want to enlist your help in this too :) )

Right now we needed to get off the binary protocol for security reasons, so we did a direct transformation into JSON and prefixed the messages with "legacy" so they don't collide with the new messages. Eventually we'll release ptvsd 4.0 that will be the start of our "fully compatible" guarantee - no breaking changes to the protocol, full compatibility with VS and VS Code extensions (of a certain version or later), and safe extensibility so we can enable things like remote REPL through the same library.

For now, I'd say your best solution is to simply document that the ptvsd version should be restricted for use with VS Code. We'd rather have your help directly on making ptvsd more compatible with VSC than making VSC more compatible with our in-transition ptvsd - we're currently working on making it easier to develop.

zooba commented Jun 15, 2017

Our long-term plan is to make ptvsd's messages match VS Code, so that any shim should be very minimal. (And we want to enlist your help in this too :) )

Right now we needed to get off the binary protocol for security reasons, so we did a direct transformation into JSON and prefixed the messages with "legacy" so they don't collide with the new messages. Eventually we'll release ptvsd 4.0 that will be the start of our "fully compatible" guarantee - no breaking changes to the protocol, full compatibility with VS and VS Code extensions (of a certain version or later), and safe extensibility so we can enable things like remote REPL through the same library.

For now, I'd say your best solution is to simply document that the ptvsd version should be restricted for use with VS Code. We'd rather have your help directly on making ptvsd more compatible with VSC than making VSC more compatible with our in-transition ptvsd - we're currently working on making it easier to develop.

@DonJayamanne

This comment has been minimized.

Show comment
Hide comment
@DonJayamanne

DonJayamanne Jun 16, 2017

Owner

@zooba Thanks, I'll wait for version 4. In the mean time I'll inform those facing issues to use version 3.

If possible I'll try to check whether the version can be detected from the client, this way a more meaningful error can be displayed to the user. Thanks again.

Owner

DonJayamanne commented Jun 16, 2017

@zooba Thanks, I'll wait for version 4. In the mean time I'll inform those facing issues to use version 3.

If possible I'll try to check whether the version can be detected from the client, this way a more meaningful error can be displayed to the user. Thanks again.

@Dlizzz

This comment has been minimized.

Show comment
Hide comment
@Dlizzz

Dlizzz Jun 17, 2017

I do confirm that with "ptvsd==3.0.0" remote debugging is working.

VS Code version: 1.13.1 on Windows
Python Extension version: 0.6.5 on Windows
tpvsd version: 3.0.0 on Ubuntu
OS and version: Client on Windows 10 Professional 1703 - Server on Ubuntu Zesty 17.04

Dlizzz commented Jun 17, 2017

I do confirm that with "ptvsd==3.0.0" remote debugging is working.

VS Code version: 1.13.1 on Windows
Python Extension version: 0.6.5 on Windows
tpvsd version: 3.0.0 on Ubuntu
OS and version: Client on Windows 10 Professional 1703 - Server on Ubuntu Zesty 17.04

@AwayQu

This comment has been minimized.

Show comment
Hide comment
@AwayQu

AwayQu Jun 19, 2017

I still got 'Debug adapter process has terminated unexpectedly' with ptvsd==3.0.0.

VS Code version: 1.13.1 on Mac
Python Extension version: 0.6.5 on Mac
ptvsd version:3.0.0 on Mac
OS version: OS X 10.12.5
Python version: 3.5.2

AwayQu commented Jun 19, 2017

I still got 'Debug adapter process has terminated unexpectedly' with ptvsd==3.0.0.

VS Code version: 1.13.1 on Mac
Python Extension version: 0.6.5 on Mac
ptvsd version:3.0.0 on Mac
OS version: OS X 10.12.5
Python version: 3.5.2

@AwayQu

This comment has been minimized.

Show comment
Hide comment
@AwayQu

AwayQu Jun 19, 2017

I also try to use ubuntu as client but still got 'Debug adapter process has terminated unexpectedly' with ptvsd==3.0.0.

VS Code version: 1.13.1 on Ubuntu
Python Extension version: 0.6.5 on Ubuntu
ptvsd version:3.0.0 on Ubuntu
OS version: Ubuntu 16.04
Python version: 3.5.2

AwayQu commented Jun 19, 2017

I also try to use ubuntu as client but still got 'Debug adapter process has terminated unexpectedly' with ptvsd==3.0.0.

VS Code version: 1.13.1 on Ubuntu
Python Extension version: 0.6.5 on Ubuntu
ptvsd version:3.0.0 on Ubuntu
OS version: Ubuntu 16.04
Python version: 3.5.2

@AwayQu

This comment has been minimized.

Show comment
Hide comment
@AwayQu

AwayQu Jun 19, 2017

I also try to use ubuntu as client but still got 'Debug adapter process has terminated unexpectedly' with ptvsd==3.0.0.

VS Code version: 1.13.1 on Ubuntu
Python Extension version: 0.6.5 on Ubuntu
ptvsd version:3.0.0 on Ubuntu
OS version: Ubuntu 16.04
Python version: 3.5.2

I also tried python 2.7.10.

AwayQu commented Jun 19, 2017

I also try to use ubuntu as client but still got 'Debug adapter process has terminated unexpectedly' with ptvsd==3.0.0.

VS Code version: 1.13.1 on Ubuntu
Python Extension version: 0.6.5 on Ubuntu
ptvsd version:3.0.0 on Ubuntu
OS version: Ubuntu 16.04
Python version: 3.5.2

I also tried python 2.7.10.

@DonJayamanne

This comment has been minimized.

Show comment
Hide comment
@DonJayamanne

DonJayamanne Jun 19, 2017

Owner

Please create a separate issue

Owner

DonJayamanne commented Jun 19, 2017

Please create a separate issue

DonJayamanne added a commit that referenced this issue Mar 16, 2018

Enable code coverage for debug adapters (#1018)
* 🔨 add instrumentation
* 🔨 track files added and modified
* build lcov files for upload
* rename report
* gulp task for yarn run
* 🐛 fix report generation
* 📝 change log
* delete debug coverage
* 🐛 disable code coverage on AppVeyor
* Fixes #778

Goom11 added a commit to mostafaeweda/pythonVSCode that referenced this issue Aug 30, 2018

Enable code coverage for debug adapters (DonJayamanne#1018)
* 🔨 add instrumentation
* 🔨 track files added and modified
* build lcov files for upload
* rename report
* gulp task for yarn run
* 🐛 fix report generation
* 📝 change log
* delete debug coverage
* 🐛 disable code coverage on AppVeyor
* Fixes DonJayamanne#778
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment