2016-06-26 6 views
0

f5キーにプログラムを実行するたびに、launch.jsonという新しいファイルが開き、そこから何をするのか分かりません。誰もハットを知っていますか?これは、ビジュアルスタジオ用のPythonをインストールする方法と同じではありません。 これはlaunch.jsonのようなものです。ビジュアルスタジオでpythonプログラムを実行するにはどうすればいいですか

{ 
    "version": "0.2.0", 
    "configurations": [ 
     { 
      "name": "Python", 
      "type": "python", 
      "request": "launch", 
      "stopOnEntry": true, 
      "program": "${file}", 
      "debugOptions": [ 
       "WaitOnAbnormalExit", 
       "WaitOnNormalExit", 
       "RedirectOutput" 
      ] 
     }, 
     { 
      "name": "Python Console App", 
      "type": "python", 
      "request": "launch", 
      "stopOnEntry": true, 
      "program": "${file}", 
      "externalConsole": true, 
      "debugOptions": [ 
       "WaitOnAbnormalExit", 
       "WaitOnNormalExit" 
      ] 
     }, 
     { 
      "name": "Django", 
      "type": "python", 
      "request": "launch", 
      "stopOnEntry": true, 
      "program": "${workspaceRoot}/manage.py", 
      "args": [ 
       "runserver", 
       "--noreload" 
      ], 
      "debugOptions": [ 
       "WaitOnAbnormalExit", 
       "WaitOnNormalExit", 
       "RedirectOutput", 
       "DjangoDebugging" 
      ] 
     }, 
     { 
      "name": "Watson", 
      "type": "python", 
      "request": "launch", 
      "stopOnEntry": true, 
      "program": "${workspaceRoot}/console.py", 
      "args": [ 
       "dev", 
       "runserver", 
       "--noreload=True" 
      ], 
      "debugOptions": [ 
       "WaitOnAbnormalExit", 
       "WaitOnNormalExit", 
       "RedirectOutput" 
      ] 
     } 
    ] 
} 

ありがとうございます!

+0

[Visual Studio 2015用のPythonツールをインストールするにはどうすればいいですか?](http://stackoverflow.com/questions/33032209/how-can-i-install-python-tool-for-visual-studio- 2015) – TemporalWolf

+0

Mushahid kahnのおかげで –

答えて

0

私はVSコードを意味すると思います。その場合、これは自動生成ファイルで、F5を押すと何が起きるかを設定できます。そのファイルをそのまま保存してから、main.pyに戻すか、デバッグする任意のpythonファイルに戻ってF5を再度押すと、最初の実行可能な行でブレークポイントでデバッグを開始します。

関連する問題