Django Girls and Boys 備忘録

Python、Selenium、Django、java、iPhoneアプリ、Excelマクロなどで気付いたこと、覚えておきたいことなどを載せていきます。

【Visual Studio Code】「Timeout waiting for debugger connection」または「Time out waiting for debugger to spawn」というエラーがでるときの解消法

 

 

Visual Studio Codepythonを実行しようとした時に「Timeout waiting for debugger connection」または「Time out waiting for debugger to spawn」というエラーが発生した場合の対処法を説明しています。

 

エラーとしては以下のような内容です。

 

f:id:kabegiwakun:20190904224943p:plain

 

結果としては、「launch.json」の「console」の設定を変更することで改善しました。

 

 

 

 

 

解決方法

 

「launch.json」を開くと元々以下のようになっていると思います。

 

 

{

    // IntelliSense を使用して利用可能な属性を学べます。

    // 既存の属性の説明をホバーして表示します。

    // 詳細情報は次を確認してください: https://go.microsoft.com/fwlink/?linkid=830387

    "version": "0.2.0",

    "configurations": [

        {

            "name": "Python: Current File",

            "type": "python",

            "request": "launch",

            "program": "${file}",

            "console": "integratedTerminal",

            "justMyCode": true

        }

    ]

}

 
 

 

この中の「console」の設定を

 

"integratedTerminal" → "internalConsole"

 

のように変更することで改善しました。

 

 

 

{

    // IntelliSense を使用して利用可能な属性を学べます。

    // 既存の属性の説明をホバーして表示します。

    // 詳細情報は次を確認してください: https://go.microsoft.com/fwlink/?linkid=830387

    "version": "0.2.0",

    "configurations": [

        {

            "name": "Python: Current File",

            "type": "python",

            "request": "launch",

            "program": "${file}",

          "console": "internalConsole",

            "justMyCode": true

        }

    ]

}