Skip to content

Commit 1fd3bc8

Browse files
authored
Remove requirement on program setting in launch.json and cleanup (#18)
* make program optional in debug json and reformat * add new line
1 parent 459a930 commit 1fd3bc8

File tree

1 file changed

+47
-50
lines changed

1 file changed

+47
-50
lines changed

package.json

Lines changed: 47 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -553,9 +553,6 @@
553553
],
554554
"configurationAttributes": {
555555
"launch": {
556-
"required": [
557-
"program"
558-
],
559556
"properties": {
560557
"module": {
561558
"type": "string",
@@ -720,44 +717,14 @@
720717
]
721718
},
722719
{
723-
"name": "Python: PySpark",
724-
"type": "python",
725-
"request": "launch",
726-
"stopOnEntry": true,
727-
"osx": {
728-
"pythonPath": "${env:SPARK_HOME}/bin/spark-submit"
729-
},
730-
"windows": {
731-
"pythonPath": "${env:SPARK_HOME}/bin/spark-submit.cmd"
732-
},
733-
"linux": {
734-
"pythonPath": "${env:SPARK_HOME}/bin/spark-submit"
735-
},
736-
"program": "${file}",
737-
"cwd": "${workspaceRoot}",
738-
"env": {},
739-
"envFile": "${workspaceRoot}/.env",
740-
"debugOptions": [
741-
"WaitOnAbnormalExit",
742-
"WaitOnNormalExit",
743-
"RedirectOutput"
744-
]
745-
},
746-
{
747-
"name": "Python: Module",
720+
"name": "Python: Attach",
748721
"type": "python",
749-
"request": "launch",
750-
"stopOnEntry": true,
751-
"pythonPath": "${config:python.pythonPath}",
752-
"module": "module.name",
753-
"cwd": "${workspaceRoot}",
754-
"env": {},
755-
"envFile": "${workspaceRoot}/.env",
756-
"debugOptions": [
757-
"WaitOnAbnormalExit",
758-
"WaitOnNormalExit",
759-
"RedirectOutput"
760-
]
722+
"request": "attach",
723+
"localRoot": "${workspaceRoot}",
724+
"remoteRoot": "${workspaceRoot}",
725+
"port": 3000,
726+
"secret": "my_secret",
727+
"host": "localhost"
761728
},
762729
{
763730
"name": "Python: Terminal (integrated)",
@@ -853,6 +820,46 @@
853820
"RedirectOutput"
854821
]
855822
},
823+
{
824+
"name": "Python: PySpark",
825+
"type": "python",
826+
"request": "launch",
827+
"stopOnEntry": true,
828+
"osx": {
829+
"pythonPath": "${env:SPARK_HOME}/bin/spark-submit"
830+
},
831+
"windows": {
832+
"pythonPath": "${env:SPARK_HOME}/bin/spark-submit.cmd"
833+
},
834+
"linux": {
835+
"pythonPath": "${env:SPARK_HOME}/bin/spark-submit"
836+
},
837+
"program": "${file}",
838+
"cwd": "${workspaceRoot}",
839+
"env": {},
840+
"envFile": "${workspaceRoot}/.env",
841+
"debugOptions": [
842+
"WaitOnAbnormalExit",
843+
"WaitOnNormalExit",
844+
"RedirectOutput"
845+
]
846+
},
847+
{
848+
"name": "Python: Module",
849+
"type": "python",
850+
"request": "launch",
851+
"stopOnEntry": true,
852+
"pythonPath": "${config:python.pythonPath}",
853+
"module": "module.name",
854+
"cwd": "${workspaceRoot}",
855+
"env": {},
856+
"envFile": "${workspaceRoot}/.env",
857+
"debugOptions": [
858+
"WaitOnAbnormalExit",
859+
"WaitOnNormalExit",
860+
"RedirectOutput"
861+
]
862+
},
856863
{
857864
"name": "Python: Pyramid",
858865
"type": "python",
@@ -892,16 +899,6 @@
892899
"WaitOnNormalExit",
893900
"RedirectOutput"
894901
]
895-
},
896-
{
897-
"name": "Python: Attach",
898-
"type": "python",
899-
"request": "attach",
900-
"localRoot": "${workspaceRoot}",
901-
"remoteRoot": "${workspaceRoot}",
902-
"port": 3000,
903-
"secret": "my_secret",
904-
"host": "localhost"
905902
}
906903
]
907904
}

0 commit comments

Comments
 (0)