{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/vscode-docs/issues/1780","repository_url":"https://api.github.com/repos/Microsoft/vscode-docs","labels_url":"https://api.github.com/repos/Microsoft/vscode-docs/issues/1780/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vscode-docs/issues/1780/comments","events_url":"https://api.github.com/repos/Microsoft/vscode-docs/issues/1780/events","html_url":"https://github.com/Microsoft/vscode-docs/issues/1780","id":349495590,"node_id":"MDU6SXNzdWUzNDk0OTU1OTA=","number":1780,"title":"some python debugging instructions are not valid anymore","user":{"login":"choeffer","id":33625292,"node_id":"MDQ6VXNlcjMzNjI1Mjky","avatar_url":"https://avatars1.githubusercontent.com/u/33625292?v=4","gravatar_id":"","url":"https://api.github.com/users/choeffer","html_url":"https://github.com/choeffer","followers_url":"https://api.github.com/users/choeffer/followers","following_url":"https://api.github.com/users/choeffer/following{/other_user}","gists_url":"https://api.github.com/users/choeffer/gists{/gist_id}","starred_url":"https://api.github.com/users/choeffer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choeffer/subscriptions","organizations_url":"https://api.github.com/users/choeffer/orgs","repos_url":"https://api.github.com/users/choeffer/repos","events_url":"https://api.github.com/users/choeffer/events{/privacy}","received_events_url":"https://api.github.com/users/choeffer/received_events","type":"User","site_admin":false},"labels":[{"id":744796348,"node_id":"MDU6TGFiZWw3NDQ3OTYzNDg=","url":"https://api.github.com/repos/Microsoft/vscode-docs/labels/python","name":"python","color":"45c65f","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-08-10T12:24:06Z","updated_at":"2018-09-05T20:36:40Z","closed_at":"2018-09-05T20:36:40Z","author_association":"NONE","body":"First Part:\r\n\r\nAs written here:\r\nhttps://code.visualstudio.com/docs/python/environments#_choose-a-debugging-environment\r\n\r\n\"Although selecting a different environment changes the python.pythonPath value in your Workspace settings.json file, it doesn't affect the User settings.json file, which is used by default for debugging. You can also specify an interpreter for debugging using the pythonPath in a debugger configuration in the launch.json file. See Debugging.\"\r\n\r\nis not valid anymore. The debugger uses the selected interpreter in the workspace settings also for debugging, even if in the user settings a different interpreter is selected.\r\n\r\nI created a venv, in this installed the package matplotlib with pip3, then created a file test.py which inherits:\r\n'\r\nimport matplotlib\r\n\r\nprint('test')\r\n'\r\nMy workspace settings are:\r\n\r\n'\r\n{\r\n    \"python.pythonPath\": \"${workspaceFolder}/env/bin/python\"\r\n}\r\n'\r\nMy user settings are:\r\n'\r\n{\r\n    \"python.pythonPath\": \"/usr/bin/python3\",\r\n    \"python.autoComplete.addBrackets\": true\r\n}\r\n'\r\nAnd with \"Run Python File in Terminal\" and \"Start Debugging\" I get no errors, even if matplotlib is just installed in the venv and not in the global python3 environment.\r\nSo the statement in the documentation is not valid anymore.\r\n\r\nSecond part:\r\n\r\nAlso in https://code.visualstudio.com/docs/python/debugging\r\n\"\r\nNote: The debugger settings don't support relative paths, including when relying on the main python.pythonPath setting. To work around this, use an environment variable, or create a variable such as ${workspaceFolder} that resolves to your project folder, then use that variable in the path, as in \"python.pythonPath\": \"${workspaceFolder}/venv/bin/python\".\r\n\"\r\nis not valid anymore. Because the same setup like above also works with just relative paths without producing any error.\r\n\r\nWith this workspace settings:\r\n\r\n'\r\n{\r\n    \"python.pythonPath\": \"./env/bin/python\"\r\n}\r\n'\r\nI am on Debian Stretch with VSCode installed from the MS repository and used the instruction in the offical documentation."}}
{"actor":{"display_login":"kraigb"}}