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

Support launch a maven goal/gradle task via launch configuration

Open jdneo opened this issue 3 years ago • 3 comments
trafficstars

[provide a description of the issue]

Currently there is no way to launch a Maven goal or Gradle task via the VS Code launch configuration, which is supported in other Java IDE.

jdneo avatar Jan 04 '22 08:01 jdneo

Hello, is there any progress? Seems like it's in backlog to me I'm asking because of need to run virtual/internally created gradle task before executing the launch/attach command

Nightenom avatar Nov 08 '23 14:11 Nightenom

@Nightenom You can customize your Gradle task in tasks.json and then call it as a preLaunchTask in launch.json. See the link https://github.com/microsoft/vscode-java-debug/issues/120#issuecomment-417269773 for an example.

testforstephen avatar Nov 09 '23 02:11 testforstephen

Thanks for link, but I'm aware of this, currently the task is added only if ide is detected and as such not easily available from command line. To use tasks.json I need to change the task/plugin impl, which is doable, but not desired. Not to mention the task has its dependsOn, which will need to be run every time I start debugging (vs once during setup from ide) (Note: it's custom gradle plugin, I'm currently using eclipse.autoBuildTasks but it's overkill and slows down everything)

Nightenom avatar Nov 09 '23 07:11 Nightenom