microsoft / microsoft/vscode-java-debug

Azure Function local debugging for multiple profile in maven

オープン
#647 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

ai-triaged attach bug buildtool
主要言語
TypeScript
スター
591
フォーク
429
平均マージ
1日 9時間
マージ済み PR(30日)
19

説明

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%

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、Launch.json と TASK.json に複数のエントリを含む構成を、preLaunchTask 名として devFunc と testFunc、およびそれらの Maven プロファイルコマンドを使用して再現します。複数のタスクが定義されている場合に、Java デバッガーが preLaunchTask をどのように解決するかを追跡します。各起動構成が誤ったタスクではなく、その名前に一致するタスクを開始すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
azure, java, vscode
領域
developer-experience, devtools
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。