microsoft / microsoft/vscode-java-debug
Azure Function local debugging for multiple profile in maven
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- TypeScript
- Estrellas
- 591
- Forks
- 429
- Merge medio
- 1 d 9 h
- PR fusionados (30 d)
- 19
Descripción
Issue Type: Bug
##------------------##----------
Launch.json
{
"name": "Attach to Java Functions dev",
"type": "java",
"request": "attach",
"hostName": "127.0.0.1",
"port": 5005,
"preLaunchTask": "devFunc"
},
{
"name": "Attach to Java Functions test",
"type": "java",
"request": "attach",
"hostName": "127.0.0.1",
"port": 5005,
"preLaunchTask": "testFunc"
}
//#########------------#############
TASK.json
//#######------------------###########
{
"version": "2.0.0",
"tasks": [
{
"label": "devFunc",
"type": "func",
"command": "host start",
"problemMatcher": "$func-watch",
"isBackground": true,
"options": {
"cwd": "${workspaceFolder}/target/azure-functions/sequation-image-resize-functions-dev/"
},
"dependsOn": ["package-dev"]
},
{
"label": "package-dev",
"command": "mvn clean package",
"type": "shell",
"problemMatcher": [
"$func-watch"
],
"isBackground": true
}
,
{
"label": "testFunc",
"type": "func",
"command": "host start",
"problemMatcher": "$func-watch",
"isBackground": true,
"options": {
"cwd": "${workspaceFolder}/target/azure-functions/sequation-image-resize-functions-test/"
},
"dependsOn": ["package-test"]
},
{
"label": "package-test",
"command": "mvn clean package -P test",
"type": "shell"
}
]
}
I have multiple profiles in my maven for each environment that I have eg: dev, test, prod I have configured the tasks to build and run pointing to each profile I have in my maven.
the prelaunch task in Launch.json does not pick up the task based on its name if there are multiple tasks defined in the task.json. I have observed it picks up the task that is defined.
to make it run I have to comment out the multiple tasks and keep just one.
in the above configuration if I comment out the below code it works fine.
//,
// {
// "label": "testFunc",
// "type": "func",
// "command": "host start",
// "problemMatcher": "$func-watch",
// "isBackground": true,
// "options": {
// "cwd": "${workspaceFolder}/target/azure-functions/sequation-image-resize-functions-test/"
// },
// "dependsOn": ["package-test"]
// },
// {
// "label": "package-test",
// "command": "mvn clean package -P test",
// "type": "shell"
// }
Extension version: 0.21.0
VS Code version: Code 1.37.1 (f06011ac164ae4dc8e753a3fe7f9549844d15e35, 2019-08-15T16:17:55.855Z)
OS version: Windows_NT x64 10.0.17763
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz (8 x 2112) |
| GPU Status | 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on native_gpu_memory_buffers: disabled_software oop_rasterization: disabled_off protected_video_decode: enabled rasterization: enabled skia_deferred_display_list: disabled_off skia_renderer: disabled_off surface_synchronization: enabled_on video_decode: enabled viz_display_compositor: disabled_off webgl: enabled webgl2: enabled |
| Load (avg) | undefined |
| Memory (System) | 15.86GB (6.46GB free) |
| Process Argv | |
| Screen Reader | no |
| VM | 0% |
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza reproduciendo la configuración con varias entradas en Launch.json y TASK.json, usando los nombres de preLaunchTask devFunc y testFunc y sus comandos de perfiles de Maven. Rastrea cómo el depurador de Java resuelve preLaunchTask cuando hay varias tareas definidas. Se considera completado cuando cada configuración de lanzamiento inicia la tarea que coincide con su nombre en lugar de la tarea incorrecta.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- azure, java, vscode
- Área
- developer-experience, devtools
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 25/100