Skip to content

VSCode remote debug not working on MacOS #819

Closed

Description

@DJManas

Environment data

VS Code version: 1.20.1 (1.20.1) - MacOS
Python Extension version: 2018.1 (01 Feb 2018)
Python Version: 3.6.4 on MacOS, 3.5.5 on Armbian (Banana PI M1+)
OS and version: MacOS 10.13.3, Armbian 4.14.18-sunxi Mainline kernel
ptvsd: 3.0.0 on both MacOS and Server (even tried with the newest one, no change)

Actual behavior

When I launch script with ptsvd on remote server and I try to connect to it from VSCode, I get:
Debug adapter process has terminated unexpectedly
For internal VSCode log, see attached file
vscode - remote debug.log

Expected behavior

Connect to server and start debugging on remote server

Steps to reproduce:

Attach configuration:

    {
      "name": "LowBattery: Remote",
      "type": "python",
      "request": "attach",
      "localRoot": "${workspaceFolder}",
      "remoteRoot": "/home/djmanas/python",
      "port": 3333,
      "secret": "my_secret",
      "host": "192.168.1.101"
    },

Code server.py:

#!/usr/bin/env python3
""" Simple script that will notify user when modules are under certain battery percent """
import ptvsd

ptvsd.enable_attach("my_secret", address=('192.168.1.101', 3333))
ptvsd.wait_for_attach()

print('test‘)

In VSCode, after upload, comment out debug lines.

On server through SSH launch python3 server.py

It waits for attach netstat -lnp

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 192.168.1.101:3333      0.0.0.0:*               LISTEN      30357/python3

Launch the LowBattery: Remote debug configuration and you will get the error.

Does the same thing when I redirect the port through ssh -L 3333:127.0.0.1:3333 and change every IP to localhost.

Logs

Output from Python output panel

##########Linting Output - pep8##########
/usr/local/lib/python3.6/site-packages/pep8.py:2124: UserWarning: 

pep8 has been renamed to pycodestyle (GitHub issue #466)
Use of the pep8 tool will be removed in a future release.
Please install and use `pycodestyle` instead.

$ pip install pycodestyle
$ pycodestyle ...

  '\n\n'
##########Linting Output - pylint##########
No config file found, using default configuration
************* Module netatmoLowBatteryWarning
5,0,warning,W0611:Unused import ptvsd

------------------------------------------------------------------
Your code has been rated at 9.52/10 (previous run: 9.52/10, +0.00)

##########Linting Output - flake8##########
Usage: flake8 [options] file file ...

flake8: error: --disable-noqa option does not take a value

Output from Console window (Help->Developer Tools menu)
Please see attached file

Output from Extensions host

[2018-02-18 15:51:50.877] [exthost1] [info] extension host started
[2018-02-18 15:51:50.909] [exthost1] [info] ExtensionService#_doActivateExtension vscode.emmet {"startup":true,"activationEvent":"*"}
[2018-02-18 15:51:50.909] [exthost1] [info] ExtensionService#loadCommonJSModule /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/emmet/out/extension
[2018-02-18 15:51:51.162] [exthost1] [info] ExtensionService#_doActivateExtension vscode.git {"startup":true,"activationEvent":"*"}
[2018-02-18 15:51:51.162] [exthost1] [info] ExtensionService#loadCommonJSModule /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/out/main
[2018-02-18 15:51:51.477] [exthost1] [info] ExtensionService#_doActivateExtension vscode.merge-conflict {"startup":true,"activationEvent":"*"}
[2018-02-18 15:51:51.477] [exthost1] [info] ExtensionService#loadCommonJSModule /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/merge-conflict/out/extension
[2018-02-18 15:51:51.554] [exthost1] [info] ExtensionService#_doActivateExtension ms-vscode.cpptools {"startup":true,"activationEvent":"*"}
[2018-02-18 15:51:51.554] [exthost1] [info] ExtensionService#loadCommonJSModule /Users/djmanas/.vscode/extensions/ms-vscode.cpptools-0.15.0/out/src/main
[2018-02-18 15:51:52.517] [exthost1] [info] ExtensionService#_doActivateExtension webfreak.debug {"startup":true,"activationEvent":"*"}
[2018-02-18 15:51:52.517] [exthost1] [info] ExtensionService#loadCommonJSModule /Users/djmanas/.vscode/extensions/webfreak.debug-0.21.2/out/src/frontend/extension
[2018-02-18 15:51:52.523] [exthost1] [info] ExtensionService#_doActivateExtension robertohuertasm.vscode-icons {"startup":true,"activationEvent":"*"}
[2018-02-18 15:51:52.523] [exthost1] [info] ExtensionService#loadCommonJSModule /Users/djmanas/.vscode/extensions/robertohuertasm.vscode-icons-7.20.0/out/src/
[2018-02-18 15:51:52.770] [exthost1] [info] ExtensionService#_doActivateExtension vscode.python {"startup":false,"activationEvent":"onLanguage:python"}
[2018-02-18 15:51:52.770] [exthost1] [info] ExtensionService#loadCommonJSModule /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/python/out/pythonMain
[2018-02-18 15:51:52.774] [exthost1] [info] ExtensionService#_doActivateExtension ms-python.python {"startup":false,"activationEvent":"onLanguage:python"}
[2018-02-18 15:51:52.774] [exthost1] [info] ExtensionService#loadCommonJSModule /Users/djmanas/.vscode/extensions/ms-python.python-2018.1.0/out/client/extension
[2018-02-18 15:51:54.984] [exthost1] [info] eager extensions activated
[2018-02-18 15:51:56.150] [exthost1] [info] ExtensionService#_doActivateExtension platformio.platformio-ide {"startup":true,"activationEvent":"*"}
[2018-02-18 15:51:56.150] [exthost1] [info] ExtensionService#loadCommonJSModule /Users/djmanas/.vscode/extensions/platformio.platformio-ide-0.12.1/lib/main
[2018-02-18 15:53:02.708] [exthost1] [info] extension host started
[2018-02-18 15:53:02.734] [exthost1] [info] ExtensionService#_doActivateExtension vscode.emmet {"startup":true,"activationEvent":"*"}
[2018-02-18 15:53:02.734] [exthost1] [info] ExtensionService#loadCommonJSModule /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/emmet/out/extension
[2018-02-18 15:53:02.804] [exthost1] [info] ExtensionService#_doActivateExtension vscode.git {"startup":true,"activationEvent":"*"}
[2018-02-18 15:53:02.804] [exthost1] [info] ExtensionService#loadCommonJSModule /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/out/main
[2018-02-18 15:53:02.895] [exthost1] [info] ExtensionService#_doActivateExtension vscode.merge-conflict {"startup":true,"activationEvent":"*"}
[2018-02-18 15:53:02.895] [exthost1] [info] ExtensionService#loadCommonJSModule /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/merge-conflict/out/extension
[2018-02-18 15:53:02.912] [exthost1] [info] ExtensionService#_doActivateExtension ms-vscode.cpptools {"startup":true,"activationEvent":"*"}
[2018-02-18 15:53:02.912] [exthost1] [info] ExtensionService#loadCommonJSModule /Users/djmanas/.vscode/extensions/ms-vscode.cpptools-0.15.0/out/src/main
[2018-02-18 15:53:03.144] [exthost1] [info] ExtensionService#_doActivateExtension webfreak.debug {"startup":true,"activationEvent":"*"}
[2018-02-18 15:53:03.144] [exthost1] [info] ExtensionService#loadCommonJSModule /Users/djmanas/.vscode/extensions/webfreak.debug-0.21.2/out/src/frontend/extension
[2018-02-18 15:53:03.146] [exthost1] [info] ExtensionService#_doActivateExtension robertohuertasm.vscode-icons {"startup":true,"activationEvent":"*"}
[2018-02-18 15:53:03.146] [exthost1] [info] ExtensionService#loadCommonJSModule /Users/djmanas/.vscode/extensions/robertohuertasm.vscode-icons-7.20.0/out/src/
[2018-02-18 15:53:03.866] [exthost1] [info] eager extensions activated
[2018-02-18 15:53:04.156] [exthost1] [info] ExtensionService#_doActivateExtension platformio.platformio-ide {"startup":true,"activationEvent":"*"}
[2018-02-18 15:53:04.156] [exthost1] [info] ExtensionService#loadCommonJSModule /Users/djmanas/.vscode/extensions/platformio.platformio-ide-0.12.1/lib/main
[2018-02-18 19:02:36.522] [exthost1] [info] extension host started
[2018-02-18 19:02:36.556] [exthost1] [info] ExtensionService#_doActivateExtension vscode.emmet {"startup":true,"activationEvent":"*"}
[2018-02-18 19:02:36.556] [exthost1] [info] ExtensionService#loadCommonJSModule /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/emmet/out/extension
[2018-02-18 19:02:36.903] [exthost1] [info] ExtensionService#_doActivateExtension vscode.git {"startup":true,"activationEvent":"*"}
[2018-02-18 19:02:36.903] [exthost1] [info] ExtensionService#loadCommonJSModule /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/git/out/main
[2018-02-18 19:02:37.311] [exthost1] [info] ExtensionService#_doActivateExtension vscode.merge-conflict {"startup":true,"activationEvent":"*"}
[2018-02-18 19:02:37.311] [exthost1] [info] ExtensionService#loadCommonJSModule /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/merge-conflict/out/extension
[2018-02-18 19:02:37.412] [exthost1] [info] ExtensionService#_doActivateExtension ms-vscode.cpptools {"startup":true,"activationEvent":"*"}
[2018-02-18 19:02:37.412] [exthost1] [info] ExtensionService#loadCommonJSModule /Users/djmanas/.vscode/extensions/ms-vscode.cpptools-0.15.0/out/src/main
[2018-02-18 19:02:38.659] [exthost1] [info] ExtensionService#_doActivateExtension webfreak.debug {"startup":true,"activationEvent":"*"}
[2018-02-18 19:02:38.659] [exthost1] [info] ExtensionService#loadCommonJSModule /Users/djmanas/.vscode/extensions/webfreak.debug-0.21.2/out/src/frontend/extension
[2018-02-18 19:02:38.670] [exthost1] [info] ExtensionService#_doActivateExtension robertohuertasm.vscode-icons {"startup":true,"activationEvent":"*"}
[2018-02-18 19:02:38.670] [exthost1] [info] ExtensionService#loadCommonJSModule /Users/djmanas/.vscode/extensions/robertohuertasm.vscode-icons-7.20.0/out/src/
[2018-02-18 19:02:39.121] [exthost1] [info] ExtensionService#_doActivateExtension vscode.python {"startup":false,"activationEvent":"onLanguage:python"}
[2018-02-18 19:02:39.121] [exthost1] [info] ExtensionService#loadCommonJSModule /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/python/out/pythonMain
[2018-02-18 19:02:39.125] [exthost1] [info] ExtensionService#_doActivateExtension ms-python.python {"startup":false,"activationEvent":"onLanguage:python"}
[2018-02-18 19:02:39.125] [exthost1] [info] ExtensionService#loadCommonJSModule /Users/djmanas/.vscode/extensions/ms-python.python-2018.1.0/out/client/extension
[2018-02-18 19:02:43.138] [exthost1] [info] eager extensions activated
[2018-02-18 19:02:44.400] [exthost1] [info] ExtensionService#_doActivateExtension platformio.platformio-ide {"startup":true,"activationEvent":"*"}
[2018-02-18 19:02:44.400] [exthost1] [info] ExtensionService#loadCommonJSModule /Users/djmanas/.vscode/extensions/platformio.platformio-ide-0.12.1/lib/main

Activity

  1. DonJayamanne commented on Feb 18, 2018

    @DonJayamanne

    Please try the following:

    • Change the code as follows:
    #!/usr/bin/env python3
    """ Simple script that will notify user when modules are under certain battery percent """
    import ptvsd
    import time
    
    ptvsd.enable_attach("my_secret", address=('192.168.1.101', 3333))
    ptvsd.wait_for_attach()
    
    time.sleep(5)
    print('test‘)
    • Start and attach
    • Add a break point to the print statement

    The problem is, the debugger attaches, but when it hits the print statement it continues and the program ends.

    Hence the need for the delay using time.sleep

  2. DJManas commented on Feb 18, 2018

    @DJManas
    Author

    Ok, did that.

    I didn’t get the message about it, but it haven’t stopped at the print statement.

    Attaching picture from VSCode and the log.
    2018-02-18_20-22-43
    1518981725042.log

  3. DJManas commented on Feb 18, 2018

    @DJManas
    Author

    And should I use ptvsd 3.0.0 or the newest one?

  4. DonJayamanne commented on Feb 18, 2018

    @DonJayamanne

    And should I use ptvsd 3.0.0 or the newest one?

    PTVSD version 3.0.0

    I didn’t get the message about it, but it haven’t stopped at the print statement.

    You need to wait for 5 seconds (remember, there's a time.sleep).
    You could reduce that to 1-2 seconds.

  5. DJManas commented on Feb 18, 2018

    @DJManas
    Author

    When I hit the green arrow to „Restart“ the debug I get the one previous error.
    1518982058645.log

    The Armbian ptvsd

    djmanas@Ankh-Morpork:~/python$ pip3 list
    DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
    iotop (0.6)
    mysqlclient (1.3.7)
    pip (9.0.1)
    ptvsd (3.0.0)
    pycurl (7.43.0)
    pygobject (3.22.0)
    python-apt (1.4.0b3)
    setuptools (38.5.1)
    unattended-upgrade
    

    MacOS ptvsd

    RinceWind:NetatmoOutsideTemperatureCollect.git djmanas$ pip3 list
    DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
    astroid (1.6.1)
    flake8 (3.5.0)
    isort (4.3.4)
    lazy-object-proxy (1.3.1)
    mccabe (0.6.1)
    mysqlclient (1.3.12)
    pep8 (1.7.1)
    pip (9.0.1)
    ptvsd (3.2.1)
    pycodestyle (2.3.1)
    pyflakes (1.6.0)
    pylint (1.8.2)
    PyMySQL (0.8.0)
    rope (0.10.7)
    setuptools (36.5.0)
    six (1.11.0)
    wheel (0.30.0)
    wrapt (1.10.11)
    

    I had waited 10 seconds before restarting.

  6. DJManas commented on Feb 18, 2018

    @DJManas
    Author

    Sorry MacOS version is 3.2.1. Reinstalling back 3.0.0 and tryiing again

  7. DJManas commented on Feb 18, 2018

    @DJManas
    Author

    Nope, still the same.

  8. DonJayamanne commented on Feb 18, 2018

    @DonJayamanne
    • Please ensure you have PTVSD 3.0.0, other versions are not supported (you had some other version installed)

    • Please try connecting to the remote environment using a tool such as nc or the like from the command line, as follows:
      nc 192.168.1.101 3333
      Let me know what you get in the console window?
      If you cannot connect in the terminal, then debugger will not work.

    • Please change the code as follows:

    #!/usr/bin/env python3
    """ Simple script that will notify user when modules are under certain battery percent """
    import ptvsd
    import time
    print('waiting to attach")
    ptvsd.enable_attach("my_secret", address=('192.168.1.101', 3333))
    ptvsd.wait_for_attach()
    print("attached")
    time.sleep(5)
    print('test‘)
    
    • Run the above code and test again
    • Confirm the output waiting to attach is printed in the console window on the remote environment
    • After attaching, please let me know what is displayed in the debug console as well as the terminal on the remote environment (i.e. is the output attached displayed` on the remote computer?)
  9. DJManas commented on Feb 18, 2018

    @DJManas
    Author

    Ok.
    MacOS pip3 list, stripped to ptvsd

    RinceWind:Desktop djmanas$ pip3 list
    DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
    ptvsd (3.0.0)
    

    Armbian pip3 list, stripped to ptvsd only

    djmanas@Ankh-Morpork:~/python$ pip3 list
    DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
    ptvsd (3.0.0)
    

    Contents of netatmoLowBatteryWarning.py

    #!/usr/bin/env python3
    # -*- coding: utf-8 -*-
    """ Simple script that will notify user when modules are under certain battery percent """
    import ptvsd
    import time
    
    print('waiting to attach')
    ptvsd.enable_attach("my_secret", address=('192.168.1.101', 3333))
    ptvsd.wait_for_attach()
    print('attached')
    time.sleep(5)
    print('test')
    

    Contents of same file in VSCode

    #!/usr/bin/env python3
    # -*- coding: utf-8 -*-
    """ Simple script that will notify user when modules are under certain battery percent """
    import ptvsd
    import time
    
    print('waiting to attach')
    # ptvsd.enable_attach("my_secret", address=('192.168.1.101', 3333))
    # ptvsd.wait_for_attach()
    print('attached')
    time.sleep(5)
    print('test')
    

    Launched the file on armbian python3 netatmoLowBatteryWarning.py

    djmanas@Ankh-Morpork:~/python$ python3 netatmoLowBatteryWarning.py
    waiting to attach
    

    Checking of port nc -z 192.168.1.101 3333

    RinceWind:NetatmoOutsideTemperatureCollect.git djmanas$ nc -z 192.168.1.101 3333
    Connection to 192.168.1.101 port 3333 [tcp/dec-notes] succeeded!
    

    Opened VSCode and launched the code in debug the message fired up right away
    2018-02-18_22-42-37

    Output on the remote server

    djmanas@Ankh-Morpork:~/python$ python3 netatmoLowBatteryWarning.py
    waiting to attach
    

    nc - z 192.168.1.101 3333

    RinceWind:NetatmoOutsideTemperatureCollect.git djmanas$ nc -z 192.168.1.101 3333
    Connection to 192.168.1.101 port 3333 [tcp/dec-notes] succeeded!
    

    Log from VSCode
    [1518990271994.log](https://github.com/Microsoft/vscode-python/files/1735142/1518990271994.

  10. DonJayamanne commented on Feb 18, 2018

    @DonJayamanne

    Please could you try running it locally and attaching to it. Lets remove the remote aspect from this and try everything locally.

  11. DJManas commented on Feb 18, 2018

    @DJManas
    Author

    Ok.
    Changed configuration to

        {
          "name": "LowBattery: Remote",
          "type": "python",
          "request": "attach",
          "localRoot": "/Users/djmanas/Dropbox/Projekty/Python/NetatmoOutsideTemperatureCollect.git/",
          "remoteRoot": "/Users/djmanas/Dropbox/Projekty/Python/NetatmoOutsideTemperatureCollect.git/",
          "port": 3333,
          "secret": "my_secret",
          "host": "localhost",
        },
    

    Changed code to:

    #!/usr/bin/env python3
    # -*- coding: utf-8 -*-
    """ Simple script that will notify user when modules are under certain battery percent """
    import ptvsd
    import time
    
    print('waiting to attach')
    ptvsd.enable_attach("my_secret", address=('localhost', 3333))
    ptvsd.wait_for_attach()
    print('attached')
    time.sleep(5)
    print('test‘)
    

    Launched the code locally

    RinceWind:NetatmoNotifyOnLowBattery.git djmanas$ python3 netatmoLowBatteryWarning.py
    waiting to attach
    

    nc -z localhost 3333

    RinceWind:Desktop djmanas$ nc -z localhost 3333
    Connection to localhost port 3333 [tcp/dec-notes] succeeded!
    

    VSCode commented the 2 lines

    #!/usr/bin/env python3
    # -*- coding: utf-8 -*-
    """ Simple script that will notify user when modules are under certain battery percent """
    import ptvsd
    import time
    
    print('waiting to attach')
    # ptvsd.enable_attach("my_secret", address=('localhost', 3333))
    # ptvsd.wait_for_attach()
    print('attached')
    time.sleep(5)
    print('test')
    

    Yep it connects
    2018-02-18_23-07-31

    Result on console

    RinceWind:NetatmoNotifyOnLowBattery.git djmanas$ python3 netatmoLowBatteryWarning.py
    waiting to attach
    attached
    test
    

    So I guess what is the resume?

  12. DonJayamanne commented on Feb 18, 2018

    @DonJayamanne

    So I guess what is the resume?

    What do you mean by this?

  13. 35 remaining items

  14. nikhilweee commented on May 10, 2018

    @nikhilweee

    Petr Šourek (@DJManas) Don Jayamanne (@DonJayamanne) did you figure out the problem? Is there a solution yet?

  15. brettcannon commented on May 10, 2018

    @brettcannon
    Member

    Nikhil Verma (@nikhilweee) no and no, unfortunately.

  16. DonJayamanne commented on May 29, 2018

    @DonJayamanne

    Petr Šourek (@DJManas)
    Please could you try this once again with our latest experimental debugger (an improved debugger):

    • pip install ptvsd --pre (install this on your remote environment)
    • Change launch.json from "type":"python" to "type":"pythonExperimental"
    • Use ptvsd.enable_attach(address=('192.168.1.101', 3333)) instead of ptvsd.enable_attach("my_secret", address=('192.168.1.101', 3333)) (the my_secret argument should be dropped)
    • Ensure you have the latest version of the Python extension installed.
  17. DJManas commented on May 30, 2018

    @DJManas
    Author

    Hello,

    • pip install ptvsd --pre
    djmanas@Ankh-Morpork:~$ pip3 install ptvsd --pre
    Collecting ptvsd
      Downloading https://files.pythonhosted.org/packages/dc/b3/b833059e1cc48e177f760c5565f4a0d16577c2fba8992bdeb3fcf1cf443f/ptvsd-4.1.1a1.zip (1.3MB)
        100% |################################| 1.3MB 72kB/s
    Building wheels for collected packages: ptvsd
      Running setup.py bdist_wheel for ptvsd ... done
    Successfully built ptvsd
    Installing collected packages: ptvsd
    Successfully installed ptvsd-4.1.1a1
    djmanas@Ankh-Morpork:~$ pip3 list
    DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
    .
    ptvsd (4.1.1a1)
    .
    
    • pythonExperimental config, dropped my_secret here as well
        {
          "name": "LowBattery: Remote",
          "type": "pythonExperimental",
          "request": "attach",
          "localRoot": "${workspaceFolder}",
          "remoteRoot": "/home/djmanas/scripts",
          "port": 4000,
          "host": "192.168.1.101",
        }
    
    • PTVSD code in script
    import ptvsd
    import time
    
    print('waiting to attach')
    ptvsd.enable_attach(address=('192.168.1.101', 4000))
    ptvsd.wait_for_attach()
    print('attached')
    time.sleep(5)
    print('test')
    
    • Version of python plugin in VSCode
      2018.4.0

    Result:

    • script run on remote
    djmanas@Ankh-Morpork:~/scripts$ python3 netatmoLowBatteryWarning.py
    warning: Debugger speedups using cython not found. Run '"/usr/bin/python3" "/home/djmanas/.local/lib/python3.5/site-packages/ptvsd/pydevd/setup_cython.py" build_ext --inplace' to build.
    waiting to attach
    
    • nc check from development PC
    RinceWind:~ djmanas$ nc -z 192.168.1.101 4000
    Connection to 192.168.1.101 port 4000 [tcp/terabase] succeeded!
    
    • By the way the remote debugger simply crashed on nc, but I guess no problem
    attached
    Exception in thread ptvsd.Client:
    Traceback (most recent call last):
      File "/home/djmanas/.local/lib/python3.5/site-packages/ptvsd/ipcjson.py", line 288, in process_one_message
        msg = self.__message.pop(0)
    IndexError: pop from empty list
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
        self.run()
      File "/usr/lib/python3.5/threading.py", line 862, in run
        self._target(*self._args, **self._kwargs)
      File "/home/djmanas/.local/lib/python3.5/site-packages/ptvsd/wrapper.py", line 686, in process_messages
        self.process_messages()
      File "/home/djmanas/.local/lib/python3.5/site-packages/ptvsd/ipcjson.py", line 282, in process_messages
        if self.process_one_message():
      File "/home/djmanas/.local/lib/python3.5/site-packages/ptvsd/ipcjson.py", line 291, in process_one_message
        self._wait_for_message()
      File "/home/djmanas/.local/lib/python3.5/site-packages/ptvsd/ipcjson.py", line 158, in _wait_for_message
        line = self._buffered_read_line_as_ascii()
      File "/home/djmanas/.local/lib/python3.5/site-packages/ptvsd/ipcjson.py", line 117, in _buffered_read_line_as_ascii
        temp = self.__socket.recv(1024)
    ConnectionResetError: [Errno 104] Connection reset by peer
    
    test
    /home/djmanas/.local/lib/python3.5/site-packages/ptvsd/wrapper.py:757: UserWarning: timed out waiting for disconnect request
      warnings.warn('timed out waiting for disconnect request')
    
    • Relaunched on server and connected using VSCode, console output
    djmanas@Ankh-Morpork:~/scripts$ python3 netatmoLowBatteryWarning.py
    warning: Debugger speedups using cython not found. Run '"/usr/bin/python3" "/home/djmanas/.local/lib/python3.5/site-packages/ptvsd/pydevd/setup_cython.py" build_ext --inplace' to build.
    waiting to attach
    attached
    pydev debugger: warning: trying to add breakpoint to file that does not exist: /Users/djmanas/Dropbox/Projekty/Python/__Libraries__/pytatmo.git/tests/netatmoAccount_test.py (will have no effect)
    pydev debugger: warning: trying to add breakpoint to file that does not exist: /Users/djmanas/Dropbox/Projekty/Python/__Libraries__/pytatmo.git/tests/netatmoAccount_test.py (will have no effect)
    pydev debugger: warning: trying to add breakpoint to file that does not exist: /Users/djmanas/Dropbox/Projekty/Python/NetatmoOutsideTemperatureCollect.git/outsideTemperatureCollect.py (will have no effect)
    test
    
    • Picture output, it WORKS (y)
      2018-05-30_10-06-58

    Thanks,
    Regards,
    Petr Sourek

  18. DonJayamanne commented on Jun 4, 2018

    @DonJayamanne

    Exception in thread ptvsd.Client:
    Traceback (most recent call last):
    File "/home/djmanas/.local/lib/python3.5/site-packages/ptvsd/ipcjson.py", line 288, in process_one_message
    msg = self.__message.pop(0)
    IndexError: pop from empty list

    This issue has been resolved in PTVSD.

    So, we can finally confirm this issue works with the new experimental debugger.

  19. DJManas commented on Jun 10, 2018

    @DJManas
    Author

    Yep. For me it is working flawlesslly, thanks

  20. locked as resolved and limited conversation to collaborators on Jul 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-debuggingbugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions