microsoft / microsoft/vscode-java-debug

Azure Function local debugging for multiple profile in maven

Aberta
#647 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

ai-triaged attach bug buildtool
Linguagem predominante
TypeScript
Estrelas
591
Forks
429
Merge médio
1d 9h
PRs com merge (30d)
19

Descrição

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%

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Direção de pesquisa

Comece reproduzindo a configuração com várias entradas em Launch.json e TASK.json, usando os nomes de preLaunchTask devFunc e testFunc e seus comandos de perfil do Maven. Rastreie como o depurador Java resolve preLaunchTask quando várias tarefas estão definidas. Está concluído quando cada configuração de inicialização inicia a tarefa correspondente ao seu nome, em vez da tarefa errada.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
azure, java, vscode
Domínio
developer-experience, devtools
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
25/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.