vscode-gradle icon indicating copy to clipboard operation
vscode-gradle copied to clipboard

I had enabled the "Debug JavaExec tasks" feature, but can not find the debug icon on tasks.

Open hjianhao opened this issue 5 years ago • 12 comments

Extension Name: vscode-gradle Extension Version: 3.5.2 OS Version: windows 10 VSCode version: 1.15.1

Describe the bug I had enabled the "Debug JavaExec tasks" feature, but can not find the debug icon on tasks.

To Reproduce I had added the following code in settings.json

    "gradle.javaDebug": {
        "clean": true,
        "tasks": [
            "run",
            "runBoot",
            "test",
            "intTest",
            "integration"
        ]
    },

Expected behavior There should be a debug icon on tasks (such as run).

But there is nothing happened.

hjianhao avatar Dec 10 '20 02:12 hjianhao

Can you show a screenshot of where you expect the debug icon to appear?

badsyntax avatar Mar 07 '21 17:03 badsyntax

same expectations. does not work. Java plugin even does not run Spring Boot application. Gradle Tasks plugin is able start bootRun task. However I cannot debug. Expected debug icon does not appear?

https://stackoverflow.com/questions/58175607/how-to-debug-bootrun-with-vscode

image

ugurlu avatar Apr 01 '21 09:04 ugurlu

hi @ugurlu The debug icon is displayed in that screenshot. It's the bug icon. Can you confirm, that after adding a breakpoint in your code, and clicking on the bug icon, the breakpoint is not hit?

badsyntax avatar Apr 01 '21 09:04 badsyntax

actually this is the expected behavior. My ide does not show bug icon. Only play icon exists. Here is the actualy snapshot

image

ugurlu avatar Apr 01 '21 09:04 ugurlu

Can you share your vscode gradle config?

badsyntax avatar Apr 01 '21 09:04 badsyntax

image

ugurlu avatar Apr 01 '21 09:04 ugurlu

Thanks, I will try debug this over the weekend.

badsyntax avatar Apr 01 '21 10:04 badsyntax

Thank you for really quick responses. Have a nice day.

ugurlu avatar Apr 01 '21 10:04 ugurlu

I think I found possible explanation. my gradle project is multi module project. If "submodule:bootRun" is used instead of "bootRun" debug icon is displayed. Maybe a wildcard can be used? Or search tasks in child projects.

ugurlu avatar Apr 08 '21 08:04 ugurlu

Sorry I wasn't able to look at this over the weekend. Thanks for letting me know about this @ugurlu. I should be able to make it greedy quite easily, and I think it makes sense for that to be the default behaviour. I'll look into making this change at some point.

badsyntax avatar Apr 08 '21 08:04 badsyntax

This issue may be relevant: https://github.com/microsoft/vscode-gradle/issues/1118

dboreham avatar Dec 08 '21 20:12 dboreham