vscode-java-debug icon indicating copy to clipboard operation
vscode-java-debug copied to clipboard

Azure Function local debugging for multiple profile in maven

Open vinishgeorge opened this issue 6 years ago • 0 comments

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%

vinishgeorge avatar Aug 30 '19 05:08 vinishgeorge