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

"Debug adapter process has terminated unexpectedly" using integrated terminal (if debugging with Python config everything works) #758

Closed
weinand opened this issue Feb 12, 2018 · 4 comments
Labels
area-debugging area-terminal bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster windows

Comments

@weinand
Copy link

weinand commented Feb 12, 2018

From @jcrmatos on December 3, 2017 16:9

  • VSCode Version: Code 1.18.1 (929bacba01ef658b873545e26034d1a8067445e9, 2017-11-16T18:32:36.023Z)
  • OS Version: Windows_NT x64 6.1.7601
  • Extensions:
Extension Author (truncated) Version
vscode-great-icons emm 2.1.20
python ms- 0.8.0

Hello,

When I debug my Python app with the python configuration everything works.
If I try to debug using the Internal terminal it starts to run, showing this command at the terminal

(dexp) C:\Users\JMatos\OneDrive\Python\dexp\dexp>cd c:\Users\JMatos\OneDrive\Python\dexp/dexp && cmd /C "set "PYTHONPATH=C:\Users\JMatos\OneDrive/python/my_modules/my_modules" && set "MYPYPATH=C:\Users\JMatos\OneDrive/python/my_modules/my_modules" && set "PYTHONIOENCODING=UTF-8" && set "PYTHONUNBUFFERED=1" && C:\Users\JMatos\Envs\dexp\Scripts\python.exe C:\Users\JMatos\.vscode\extensions\ms-python.python-0.8.0\pythonFiles\PythonTools\visualstudio_py_launcher.py c:\Users\JMatos\OneDrive\Python\dexp/dexp 58394 34806ad9-833a-4524-8cd6-18ca4aa74f14 WaitOnAbnormalExit,WaitOnNormalExit c:\Users\JMatos\OneDrive\Python\dexp\dexp\dexp.py "

(dexp) C:\Users\JMatos\OneDrive\Python\dexp\dexp>

but then stops with an error showing up in the upper part of VS Code stating "Debug adapter process has terminated unexpectedly", without any helpful message.

How can I check what is the problem? Is there a log file somewhere?

To use venvs I made the following changes:
User settings
"python.venvPath": "~/Envs"

Workspace settings

"settings": {
		"python.pythonPath": "C:\\Users\\JMatos\\Envs\\dexp\\Scripts\\python.exe",
		"terminal.integrated.shellArgs.windows": [
			"/K",
			"set PYTHONPATH=%OneDrive%\\python\\my_modules\\my_modules && set MYPYPATH=%OneDrive%\\python\\my_modules\\my_modules && workon dexp && cd %OneDrive%\\Python\\dexp\\dexp"
		]
	}

launch.json

"configurations": [
        {
            "name": "Python",
            "type": "python",
            "request": "launch",
            "stopOnEntry": true,
            "pythonPath": "${config:python.pythonPath}",
            "program": "${file}",
            "cwd": "${workspaceRoot}/dexp",
            "env": {"PYTHONPATH": "${env:OneDrive}/python/my_modules/my_modules",
                    "MYPYPATH": "${env:OneDrive}/python/my_modules/my_modules"},
            "envFile": "${workspaceRoot}/.env",
            "debugOptions": [
                "WaitOnAbnormalExit",
                "WaitOnNormalExit",
                "RedirectOutput"
            ]
        },

...

        {
            "name": "Python: Terminal (integrated)",
            "type": "python",
            "request": "launch",
            "stopOnEntry": true,
            "pythonPath": "${config:python.pythonPath}",
            "program": "${file}",
            "cwd": "${workspaceRoot}/dexp",
            "console": "integratedTerminal",
            "env": {"PYTHONPATH": "${env:OneDrive}/python/my_modules/my_modules",
                    "MYPYPATH": "${env:OneDrive}/python/my_modules/my_modules"},
            "envFile": "${workspaceRoot}/.env",
            "debugOptions": [
                "WaitOnAbnormalExit",
                "WaitOnNormalExit"
            ]
        },
...

This is a Tk app.

Thanks,

JM

Copied from original issue: microsoft/vscode#39497

@DonJayamanne
Copy link

DonJayamanne commented Feb 12, 2018

@jcrmatos

Please try removing the following settings and trying again
terminal.integrated.shellArgs.windows

@DonJayamanne DonJayamanne added bug Issue identified by VS Code Team member as probable bug area-debugging info-needed Issue requires more information from poster area-terminal windows labels Feb 12, 2018
@jcrmatos
Copy link

Hello,

What are the firing settings?
If you mean the terminal.integrated.shellArgs.windows it is empty.

Thanks,

JM

@DonJayamanne
Copy link

@jcrmatos

Please try removing the following settings and trying again
terminal.integrated.shellArgs.windows

@brettcannon
Copy link
Member

Because it has been more than a month since we requested more info, I'm closing this issue. If you are able to provide the info later then please do so and we can re-open the issue.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-debugging area-terminal bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster windows
Projects
None yet
Development

No branches or pull requests

4 participants