2017-12-07 3 views
0

디버그 콘솔에 입력 할 수 없기 때문에 VS 코드의 외부 터미널에서 디버거를 실행하려고합니다. VS 코드의 외부 터미널 디버거

외부 터미널 용 launch.json 구성 파일의 일부입니다. 그들이 here 말했다 내가 또는 그 진술없이 시도로

{ 
      "name": "Python: Terminal (external)", 
      "type": "python", 
      "request": "launch", 
      "stopOnEntry": true, 
      "pythonPath": "${config:python.pythonPath}", 
      "program": "${file}", 
      "cwd": "", 
      "console": "externalTerminal", 
      "env": {}, 
      "externalConsole": true, 
      "envFile": "${workspaceRoot}/.env", 
      "debugOptions": [ 
       "WaitOnAbnormalExit", 
       "WaitOnNormalExit" 
      ] 
}, 

은 내가 "externalConsole": true 부분을 추가했다.

나는

Debug adapter process has terminated unexpectedly 

은 내가 docs와 JSON 파일의 인텔리했지만, 이해하고 동작하지 않습니다이 오류가 발생합니다.

+0

내가 도움이된다면 linux btw를 사용하고 있습니다. –

답변

0

Windows를 사용하고 있지만 문제가 해결됩니다.

"name": "Python: Terminal (external)", 
     "type": "python", 
     "request": "launch", 
     "stopOnEntry": true, 
     "pythonPath": "C:/Users/Zac/Anaconda3/python.exe", 
     "program": "${file}", 
     "cwd": "", 
     "console": "externalTerminal", 
     "env": {}, 
     "envFile": "${workspaceFolder}/.env", 
     "debugOptions": [ 
      "RedirectOutput" 
     ] 
    }, 

"pythonPath"줄에 python.exe 위치의 경로를 올바르게 추가해야합니다.

또한 "debugOptions"에서 "WaitOnAbnormalExit"및 "WaitOnNormalExit"을 제거하고 "RedirectOutput"을 사용하십시오. 코드에서 "externalConsole"을 제거합니다. true.

다른 모든 것은 동일하게 유지되어야합니다.

희망이 있습니다. 건배.

관련 문제