0

Whenever I hit the f5 key to run a program a new file called launch.json opens and I don't know what to do from there. Does anyone know hat to do and no this is no the same as how do I install python for visual studio. This is what launch.json looks like.

{
    "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"
            ]
        }
    ]
}

Thanks in advance !

Will Shepard
  • 135
  • 1
  • 1
  • 7

1 Answers1

0

I guess you meant VS Code. If that's the case, this is an auto generated file where you can configure what will happen when you press F5. If you save that file as is and then switch back to your main.py or whatever python file you want to debug and press again F5 you will start debugging with a breakpoint on your first executable line.

Darien Pardinas
  • 5,910
  • 1
  • 41
  • 48