Python Forum
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Launch.json isn't working
#5
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python",
            "type": "python",
            "request": "launch",
            "stopOnEntry": true,
            "pythonPath": "${config.python.pythonPath}",
            "program": "${file}",
            "cwd": "${workspaceRoot}",
            "env": null,
            "envFile": "${workspaceRoot}/.env",
            "debugOptions": [
                "WaitOnAbnormalExit",
                "WaitOnNormalExit",
                "RedirectOutput"
            ]
        },
        {
            "name": "PySpark",
            "type": "python",
            "request": "launch",
            "stopOnEntry": true,
            "osx": {
                "pythonPath": "${env.SPARK_HOME}/bin/spark-submit"
            },
            "windows": {
                "pythonPath": "${env.SPARK_HOME}/bin/spark-submit.cmd"
            },
            "linux": {
                "pythonPath": "${env.SPARK_HOME}/bin/spark-submit"
            },
            "program": "${file}",
            "cwd": "${workspaceRoot}",
            "env": null,
            "envFile": "${workspaceRoot}/.env",
            "debugOptions": [
                "WaitOnAbnormalExit",
                "WaitOnNormalExit",
                "RedirectOutput"
            ]
        },
        {
            "name": "Python Module",
            "type": "python",
            "request": "launch",
            "stopOnEntry": true,
            "pythonPath": "${config.python.pythonPath}",
            "module": "module.name",
            "cwd": "${workspaceRoot}",
            "env": null,
            "envFile": "${workspaceRoot}/.env",
            "debugOptions": [
                "WaitOnAbnormalExit",
                "WaitOnNormalExit",
                "RedirectOutput"
            ]
        },
        {
            "name": "Integrated Terminal/Console",
            "type": "python",
            "request": "launch",
            "stopOnEntry": true,
            "pythonPath": "${config.python.pythonPath}",
            "program": "${file}",
            "cwd": null,
            "console": "integratedTerminal",
            "env": null,
            "envFile": "${workspaceRoot}/.env",
            "debugOptions": [
                "WaitOnAbnormalExit",
                "WaitOnNormalExit"
            ]
        },
        {
            "name": "External Terminal/Console",
            "type": "python",
            "request": "launch",
            "stopOnEntry": true,
            "pythonPath": "${config.python.pythonPath}",
            "program": "${file}",
            "cwd": null,
            "console": "externalTerminal",
            "env": null,
            "envFile": "${workspaceRoot}/.env",
            "debugOptions": [
                "WaitOnAbnormalExit",
                "WaitOnNormalExit"
            ]
        },
        {
            "name": "Django",
            "type": "python",
            "request": "launch",
            "stopOnEntry": true,
            "pythonPath": "${config.python.pythonPath}",
            "program": "${workspaceRoot}/manage.py",
            "cwd": "${workspaceRoot}",
            "args": [
                "runserver",
                "--noreload"
            ],
            "env": null,
            "envFile": "${workspaceRoot}/.env",
            "debugOptions": [
                "WaitOnAbnormalExit",
                "WaitOnNormalExit",
                "RedirectOutput",
                "DjangoDebugging"
            ]
        },
        {
            "name": "Flask",
            "type": "python",
            "request": "launch",
            "stopOnEntry": false,
            "pythonPath": "${config.python.pythonPath}",
            "program": "fully qualified path fo 'flask' executable. Generally located along with python interpreter",
            "cwd": "${workspaceRoot}",
            "env": {
                "FLASK_APP": "${workspaceRoot}/quickstart/app.py"
            },
            "args": [
                "run",
                "--no-debugger",
                "--no-reload"
            ],
            "envFile": "${workspaceRoot}/.env",
            "debugOptions": [
                "WaitOnAbnormalExit",
                "WaitOnNormalExit",
                "RedirectOutput"
            ]
        },
        {
            "name": "Flask (old)",
            "type": "python",
            "request": "launch",
            "stopOnEntry": false,
            "pythonPath": "${config.python.pythonPath}",
            "program": "${workspaceRoot}/run.py",
            "cwd": "${workspaceRoot}",
            "args": [],
            "env": null,
            "envFile": "${workspaceRoot}/.env",
            "debugOptions": [
                "WaitOnAbnormalExit",
                "WaitOnNormalExit",
                "RedirectOutput"
            ]
        },
        {
            "name": "Pyramid",
            "type": "python",
            "request": "launch",
            "stopOnEntry": true,
            "pythonPath": "${config.python.pythonPath}",
            "cwd": "${workspaceRoot}",
            "env": null,
            "envFile": "${workspaceRoot}/.env",
            "args": [
                "${workspaceRoot}/development.ini"
            ],
            "debugOptions": [
                "WaitOnAbnormalExit",
                "WaitOnNormalExit",
                "RedirectOutput",
                "Pyramid"
            ]
        },
        {
            "name": "Watson",
            "type": "python",
            "request": "launch",
            "stopOnEntry": true,
            "pythonPath": "${config.python.pythonPath}",
            "program": "${workspaceRoot}/console.py",
            "cwd": "${workspaceRoot}",
            "args": [
                "dev",
                "runserver",
                "--noreload=True"
            ],
            "env": null,
            "envFile": "${workspaceRoot}/.env",
            "debugOptions": [
                "WaitOnAbnormalExit",
                "WaitOnNormalExit",
                "RedirectOutput"
            ]
        },
        {
            "name": "Attach (Remote Debug)",
            "type": "python",
            "request": "attach",
            "localRoot": "${workspaceRoot}",
            "remoteRoot": "${workspaceRoot}",
            "port": 3000,
            "secret": "my_secret",
            "host": "localhost"
        }
    ]
}

{

    "version": "0.2.0",

    "configurations": [

        {

            "name": "Python",

            "type": "python",

            "request": "launch",

            "stopOnEntry": true,

            "pythonPath": "${config.python.pythonPath}",

            "program": "${file}",

            "cwd": "${workspaceRoot}",

            "env": null,

            "envFile": "${workspaceRoot}/.env",

            "debugOptions": [

                "WaitOnAbnormalExit",

                "WaitOnNormalExit",

                "RedirectOutput"

            ]

        },

        {

            "name": "PySpark",

            "type": "python",

            "request": "launch",

            "stopOnEntry": true,

            "osx": {

                "pythonPath": "${env.SPARK_HOME}/bin/spark-submit"

            },

            "windows": {

                "pythonPath": "${env.SPARK_HOME}/bin/spark-submit.cmd"

            },

            "linux": {

                "pythonPath": "${env.SPARK_HOME}/bin/spark-submit"

            },

            "program": "${file}",

            "cwd": "${workspaceRoot}",

            "env": null,

            "envFile": "${workspaceRoot}/.env",

            "debugOptions": [

                "WaitOnAbnormalExit",

                "WaitOnNormalExit",

                "RedirectOutput"

            ]

        },

        {

            "name": "Python Module",

            "type": "python",

            "request": "launch",

            "stopOnEntry": true,

            "pythonPath": "${config.python.pythonPath}",

            "module": "module.name",

            "cwd": "${workspaceRoot}",

            "env": null,

            "envFile": "${workspaceRoot}/.env",

            "debugOptions": [

                "WaitOnAbnormalExit",

                "WaitOnNormalExit",

                "RedirectOutput"

            ]

        },

        {

            "name": "Integrated Terminal/Console",

            "type": "python",

            "request": "launch",

            "stopOnEntry": true,

            "pythonPath": "${config.python.pythonPath}",

            "program": "${file}",

            "cwd": null,

            "console": "integratedTerminal",

            "env": null,

            "envFile": "${workspaceRoot}/.env",

            "debugOptions": [

                "WaitOnAbnormalExit",

                "WaitOnNormalExit"

            ]

        },

        {

            "name": "External Terminal/Console",

            "type": "python",

            "request": "launch",

            "stopOnEntry": true,

            "pythonPath": "${config.python.pythonPath}",

            "program": "${file}",

            "cwd": null,

            "console": "externalTerminal",

            "env": null,

            "envFile": "${workspaceRoot}/.env",

            "debugOptions": [

                "WaitOnAbnormalExit",

                "WaitOnNormalExit"

            ]

        },

        {

            "name": "Django",

            "type": "python",

            "request": "launch",

            "stopOnEntry": true,

            "pythonPath": "${config.python.pythonPath}",

            "program": "${workspaceRoot}/manage.py",

            "cwd": "${workspaceRoot}",

            "args": [

                "runserver",

                "--noreload"

            ],

            "env": null,

            "envFile": "${workspaceRoot}/.env",

            "debugOptions": [

                "WaitOnAbnormalExit",

                "WaitOnNormalExit",

                "RedirectOutput",

                "DjangoDebugging"

            ]

        },

        {

            "name": "Flask",

            "type": "python",

            "request": "launch",

            "stopOnEntry": false,

            "pythonPath": "${config.python.pythonPath}",

            "program": "fully qualified path fo 'flask' executable. Generally located along with python interpreter",

            "cwd": "${workspaceRoot}",

            "env": {

                "FLASK_APP": "${workspaceRoot}/quickstart/app.py"

            },

            "args": [

                "run",

                "--no-debugger",

                "--no-reload"

            ],

            "envFile": "${workspaceRoot}/.env",

            "debugOptions": [

                "WaitOnAbnormalExit",

                "WaitOnNormalExit",

                "RedirectOutput"

            ]

        },

        {

            "name": "Flask (old)",

            "type": "python",

            "request": "launch",

            "stopOnEntry": false,

            "pythonPath": "${config.python.pythonPath}",

            "program": "${workspaceRoot}/run.py",

            "cwd": "${workspaceRoot}",

            "args": [],

            "env": null,

            "envFile": "${workspaceRoot}/.env",

            "debugOptions": [

                "WaitOnAbnormalExit",

                "WaitOnNormalExit",

                "RedirectOutput"

            ]

        },

        {

            "name": "Pyramid",

            "type": "python",

            "request": "launch",

            "stopOnEntry": true,

            "pythonPath": "${config.python.pythonPath}",

            "cwd": "${workspaceRoot}",

            "env": null,

            "envFile": "${workspaceRoot}/.env",

            "args": [

                "${workspaceRoot}/development.ini"

            ],

            "debugOptions": [

                "WaitOnAbnormalExit",

                "WaitOnNormalExit",

                "RedirectOutput",

                "Pyramid"

            ]

        },

        {

            "name": "Watson",

            "type": "python",

            "request": "launch",

            "stopOnEntry": true,

            "pythonPath": "${config.python.pythonPath}",

            "program": "${workspaceRoot}/console.py",

            "cwd": "${workspaceRoot}",

            "args": [

                "dev",

                "runserver",

                "--noreload=True"

            ],

            "env": null,

            "envFile": "${workspaceRoot}/.env",

            "debugOptions": [

                "WaitOnAbnormalExit",

                "WaitOnNormalExit",

                "RedirectOutput"

            ]

        },

        {

            "name": "Attach (Remote Debug)",

            "type": "python",

            "request": "attach",

            "localRoot": "${workspaceRoot}",

            "remoteRoot": "${workspaceRoot}",

            "port": 3000,

            "secret": "my_secret",

            "host": "localhost"

        }

    ]
}
Reply


Messages In This Thread
Launch.json isn't working - by RemyLeBleau - Mar-16-2017, 03:52 PM
RE: Launch.json isn't working - by Larz60+ - Mar-16-2017, 04:05 PM
RE: Launch.json isn't working - by RemyLeBleau - Mar-16-2017, 04:26 PM
RE: Launch.json isn't working - by Larz60+ - Mar-16-2017, 06:30 PM
RE: Launch.json isn't working - by RemyLeBleau - Mar-16-2017, 08:53 PM
RE: Launch.json isn't working - by nilamo - Mar-16-2017, 09:37 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Error on first Python launch garryp4 5 4,131 May-07-2024, 03:56 PM
Last Post: deanhystad
  Launch Windows Application OEMS1 0 2,901 Mar-26-2021, 07:42 PM
Last Post: OEMS1
Photo Python won`t launch error newbieee 0 2,340 Feb-02-2021, 11:51 PM
Last Post: newbieee
  error message on program launch DJPY1175 0 2,183 Jun-10-2019, 08:40 AM
Last Post: DJPY1175
  [split] Python won't launch Nikmartin 1 3,002 May-12-2019, 11:58 PM
Last Post: micseydel
  Pyinstaller exe won't launch after crash kainev 0 3,284 May-11-2019, 06:06 PM
Last Post: kainev
  launch .exe from python script in windows hary 8 63,696 Mar-21-2017, 10:25 AM
Last Post: Ofnuts
  Python Launch Options Flexico 6 8,709 Dec-07-2016, 06:58 AM
Last Post: Flexico
  Python won't launch Norimaki 4 8,903 Nov-05-2016, 10:38 AM
Last Post: wavic

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020