Skip to content

Commit 444befa

Browse files
authored
Simplify generation of launch.json with prompts (microsoft#3745)
* Rename folder * Refactor debug configuration provider * refactor config and labels * Revert config * Add prompts * Add tests * News entry * add telemetry
1 parent a139248 commit 444befa

48 files changed

Lines changed: 1824 additions & 102 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

news/1 Enhancements/3321.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Prompt user to select a debug configuration when generating the `launch.json`.

package.json

Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -887,65 +887,7 @@
887887
}
888888
}
889889
}
890-
},
891-
"initialConfigurations": [
892-
{
893-
"name": "Python: Current File (Integrated Terminal)",
894-
"type": "python",
895-
"request": "launch",
896-
"program": "${file}",
897-
"console": "integratedTerminal"
898-
},
899-
{
900-
"name": "Python: Attach",
901-
"type": "python",
902-
"request": "attach",
903-
"port": 5678,
904-
"host": "localhost"
905-
},
906-
{
907-
"name": "Python: Module",
908-
"type": "python",
909-
"request": "launch",
910-
"module": "enter-your-module-name-here",
911-
"console": "integratedTerminal"
912-
},
913-
{
914-
"name": "Python: Django",
915-
"type": "python",
916-
"request": "launch",
917-
"program": "${workspaceFolder}/manage.py",
918-
"console": "integratedTerminal",
919-
"args": [
920-
"runserver",
921-
"--noreload",
922-
"--nothreading"
923-
],
924-
"django": true
925-
},
926-
{
927-
"name": "Python: Flask",
928-
"type": "python",
929-
"request": "launch",
930-
"module": "flask",
931-
"env": {
932-
"FLASK_APP": "app.py"
933-
},
934-
"args": [
935-
"run",
936-
"--no-debugger",
937-
"--no-reload"
938-
],
939-
"jinja": true
940-
},
941-
{
942-
"name": "Python: Current File (External Terminal)",
943-
"type": "python",
944-
"request": "launch",
945-
"program": "${file}",
946-
"console": "externalTerminal"
947-
}
948-
]
890+
}
949891
}
950892
],
951893
"configuration": {

package.nls.de.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"python.snippet.launch.externalTerminal.description": "Python-Programm mit externem Terminal/Konsole debuggen",
3636
"python.snippet.launch.django.label": "Python: Django",
3737
"python.snippet.launch.django.description": "Django-Anwendung debuggen",
38-
"python.snippet.launch.flask.label": "Python: Flask (0.11.x oder neuer)",
38+
"python.snippet.launch.flask.label": "Python: Flask",
3939
"python.snippet.launch.flask.description": "Flask-Anwendung debuggen",
4040
"python.snippet.launch.flaskOld.label": "Python: Flask (0.10.x oder früher)",
4141
"python.snippet.launch.flaskOld.description": "Ältere Flask-Anwendung debuggen",

package.nls.es.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"python.snippet.launch.externalTerminal.description": "Depurar una aplicación Python usando una terminal externa",
3636
"python.snippet.launch.django.label": "Python: Django",
3737
"python.snippet.launch.django.description": "Depurar una aplicación de Django",
38-
"python.snippet.launch.flask.label": "Python: Flask (Versión 0.11.x o posterior)",
38+
"python.snippet.launch.flask.label": "Python: Flask",
3939
"python.snippet.launch.flask.description": "Depurar una aplicación de Flask",
4040
"python.snippet.launch.flaskOld.label": "Python: Flask (Versión 0.10.x o anterior)",
4141
"python.snippet.launch.flaskOld.description": "Depurar una aplicación de Flask de estilo antiguo",

package.nls.fr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"python.snippet.launch.externalTerminal.description": "Déboguer un programme Python avec une console externe",
3535
"python.snippet.launch.django.label": "Python : Django",
3636
"python.snippet.launch.django.description": "Déboguer une application Django",
37-
"python.snippet.launch.flask.label": "Python : Flask (0.11.x ou supérieur)",
37+
"python.snippet.launch.flask.label": "Python : Flask",
3838
"python.snippet.launch.flask.description": "Déboguer une application Flask",
3939
"python.snippet.launch.flaskOld.label": "Python : Flask (0.10.x ou antérieur)",
4040
"python.snippet.launch.flaskOld.description": "Déboguer une application Flask (0.10.x ou antérieur)",

package.nls.it.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"python.snippet.launch.externalTerminal.description": "Esegui debug di un programma Python nel terminale esterno",
3535
"python.snippet.launch.django.label": "Python: Django",
3636
"python.snippet.launch.django.description": "Esegui debug applicazione Django",
37-
"python.snippet.launch.flask.label": "Python: Flask (0.11.x o successiva)",
37+
"python.snippet.launch.flask.label": "Python: Flask",
3838
"python.snippet.launch.flask.description": "Esegui debug applicazione Flask",
3939
"python.snippet.launch.flaskOld.label": "Python: Flask (0.10.x o precedente)",
4040
"python.snippet.launch.flaskOld.description": "Esegui debug applicazione Flask in vecchio stile",

package.nls.ja.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"python.snippet.launch.externalTerminal.description": "外部のターミナル/コンソールで Python プログラムをデバッグ",
3131
"python.snippet.launch.django.label": "Python: Django",
3232
"python.snippet.launch.django.description": "Django アプリケーションをデバッグ",
33-
"python.snippet.launch.flask.label": "Python: Flask (0.11.x 以降)",
33+
"python.snippet.launch.flask.label": "Python: Flask",
3434
"python.snippet.launch.flask.description": "Flask アプリケーションをデバッグ",
3535
"python.snippet.launch.flaskOld.label": "Python: Flask (0.10.x 以前)",
3636
"python.snippet.launch.flaskOld.description": "旧式の Flask アプリケーションをデバッグ",

package.nls.json

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"python.snippet.launch.externalTerminal.description": "Debug a Python program with External Terminal/Console",
5555
"python.snippet.launch.django.label": "Python: Django",
5656
"python.snippet.launch.django.description": "Debug a Django Application",
57-
"python.snippet.launch.flask.label": "Python: Flask (0.11.x or later)",
57+
"python.snippet.launch.flask.label": "Python: Flask",
5858
"python.snippet.launch.flask.description": "Debug a Flask Application",
5959
"python.snippet.launch.flaskOld.label": "Python: Flask (0.10.x or earlier)",
6060
"python.snippet.launch.flaskOld.description": "Debug an older styled Flask Application",
@@ -135,9 +135,41 @@
135135
"Common.canceled": "Canceled",
136136
"DataScience.importChangeDirectoryComment": "#%% Change working directory from the workspace root to the ipynb file location. Turn this addition off with the DataSciece.changeDirOnImportExport setting",
137137
"DataScience.exportChangeDirectoryComment": "# Change directory to VSCode workspace root so that relative path loads work correctly. Turn this addition off with the DataSciece.changeDirOnImportExport setting",
138-
"DataScience.interruptKernelStatus" : "Interrupting iPython Kernel",
139-
"DataScience.restartKernelAfterInterruptMessage" : "Interrupting the kernel timed out. Do you want to restart the kernel instead? All variables will be lost.",
140-
"DataScience.pythonInterruptFailedHeader" : "Keyboard interrupt crashed the kernel. Kernel restarted.",
141-
"DataScience.sysInfoURILabel" : "Jupyter Server URI: ",
142-
"Common.loadingPythonExtension": "Python extension loading..."
138+
"DataScience.interruptKernelStatus": "Interrupting iPython Kernel",
139+
"DataScience.restartKernelAfterInterruptMessage": "Interrupting the kernel timed out. Do you want to restart the kernel instead? All variables will be lost.",
140+
"DataScience.pythonInterruptFailedHeader": "Keyboard interrupt crashed the kernel. Kernel restarted.",
141+
"DataScience.sysInfoURILabel": "Jupyter Server URI: ",
142+
"Common.loadingPythonExtension": "Python extension loading...",
143+
"debug.selectConfigurationTitle": "Select a debug configuration",
144+
"debug.selectConfigurationPlaceholder": "Debug Configuration",
145+
"debug.debugFileConfigurationLabel": "Python File",
146+
"debug.debugFileConfigurationDescription": "Debug python file",
147+
"debug.debugModuleConfigurationLabel": "Module",
148+
"debug.debugModuleConfigurationDescription": "Debug Python module/package",
149+
"debug.remoteAttachConfigurationLabel": "Remote Attach",
150+
"debug.remoteAttachConfigurationDescription": "Debug a remote python program",
151+
"debug.debugDjangoConfigurationLabel": "Django",
152+
"debug.debugDjangoConfigurationDescription": "Web Application",
153+
"debug.debugFlaskConfigurationLabel": "Flask",
154+
"debug.debugFlaskConfigurationDescription": "Web Application",
155+
"debug.debugPyramidConfigurationLabel": "Pyramid",
156+
"debug.debugPyramidConfigurationDescription": "Web Application",
157+
"debug.djangoEnterManagePyPathTitle": "Debug Django",
158+
"debug.djangoEnterManagePyPathPrompt": "Enter path to manage.py",
159+
"debug.djangoEnterManagePyPathInvalidFilePathError": "Enter a valid python file path",
160+
"debug.flaskEnterAppPathOrNamePathTitle": "Debug Flask",
161+
"debug.flaskEnterAppPathOrNamePathPrompt": "Enter path to Application, e.g. 'app.py' or 'app'",
162+
"debug.flaskEnterAppPathOrNamePathInvalidNameError": "Enter a valid name",
163+
"debug.moduleEnterModuleTitle": "Debug Module",
164+
"debug.moduleEnterModulePrompt": "Enter Python module/package name",
165+
"debug.moduleEnterModuleInvalidNameError": "Enter a valid name",
166+
"debug.pyramidEnterDevelopmentIniPathTitle": "Debug Pyramid",
167+
"debug.pyramidEnterDevelopmentIniPathPrompt": "`Enter path to development.ini ('${workspaceFolderToken}' points to the root of the current workspace folder)`",
168+
"debug.pyramidEnterDevelopmentIniPathInvalidFilePathError": "Enter a valid file path",
169+
"debug.attachRemotePortTitle": "Remote Debugging",
170+
"debug.attachRemotePortPrompt": "Enter Port Number",
171+
"debug.attachRemotePortValidationError": "Enter a valid Port Number",
172+
"debug.attachRemoteHostTitle": "Remote Debugging",
173+
"debug.attachRemoteHostPrompt": "Enter Host Name",
174+
"debug.attachRemoteHostValidationError": "Enter a Host Name or IP Address"
143175
}

package.nls.ko-kr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"python.snippet.launch.externalTerminal.description": "외부 터미널/콘솔에서 Python 프로그램 디버그",
3131
"python.snippet.launch.django.label": "Python: Django",
3232
"python.snippet.launch.django.description": "Django 응용 프로그램 디버그",
33-
"python.snippet.launch.flask.label": "Python: Flask (0.11.x 또는 이후 버전)",
33+
"python.snippet.launch.flask.label": "Python: Flask",
3434
"python.snippet.launch.flask.description": "Flask 응용 프로그램 디버그",
3535
"python.snippet.launch.flaskOld.label": "Python: Flask (0.10.x 또는 이전 버전)",
3636
"python.snippet.launch.flaskOld.description": "이전 스타일의 Flask 응용 프로그램 디버그",

package.nls.pt-br.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"python.snippet.launch.externalTerminal.description": "Depurar um Programa Python com Terminal/Console Externo",
3636
"python.snippet.launch.django.label": "Python: Django",
3737
"python.snippet.launch.django.description": "Depurar uma Aplicação Django",
38-
"python.snippet.launch.flask.label": "Python: Flask (0.11.x ou superior)",
38+
"python.snippet.launch.flask.label": "Python: Flask",
3939
"python.snippet.launch.flask.description": "Depurar uma Aplicação Flask",
4040
"python.snippet.launch.flaskOld.label": "Python: Flask (0.10.x ou inferior)",
4141
"python.snippet.launch.flaskOld.description": "Depurar uma Aplicação Flask no Estilo Antigo",

0 commit comments

Comments
 (0)