Update .vscode/tasks.json to run Debug Quarkus command with missing mvnw#578
Conversation
There was a problem hiding this comment.
If I take your change and a quarkus project (eg. config-quickstart) with no .vscode/ folder and just call the Debug Quarkus command, it generates everything as before, but the debugging doesn't start.
It looks like the last line of startDebugging :
await debug.startDebugging(workspaceFolder, debugConfig); never runs.
I think part of the issue is that getQuarkusDevDebugConfig is also used by waitUntilTaskExists as the last step up creating the launch config in createLaunchConfig.
I also noticed shouldUpdateTaskCommand() is returning undefined even when the wrapper command is still there. I'd have a look at getWrapperPathFromBuildFile as I think that isn't finding the wrapper.
fd9ef9c to
a2d7a91
Compare
|
@rgrunber you were correct! I needed to use another way to find the wrapper command. It should work fine now |
a2d7a91 to
0dd87a2
Compare
rgrunber
left a comment
There was a problem hiding this comment.
Overall, this works in the general case. Just some things to polish up and one thing to fix.
One thing to keep in mind that I don't think we need to deal with here is priority. For example, let's say you can't locate the wrapper in the project folder, so you use the default, which works. What happens if the wrapper is put back/re-introduced. Should we detect it and refresh again ? We can address this an another issue if we really feel we should handle this.
0dd87a2 to
7b36247
Compare
rgrunber
left a comment
There was a problem hiding this comment.
Nice. This even gives priority to the project wrapper (if it exists) ! Just one small thing to address and I think we can merge.
| const launchJson = workspace.getConfiguration('launch', this.workspaceFolder.uri); | ||
| const configurations: DebugConfiguration[] = launchJson.get<DebugConfiguration[]>('configurations'); | ||
| const configurations: DebugConfiguration[] = launchJson.get<DebugConfiguration[]>('configurations') | ||
| .filter(task => task['preLaunchTask'] != this.quarkusBuildSupport.getQuarkusDevTaskName(this.workspaceFolder, this.projectFolder)); |
There was a problem hiding this comment.
Is there any reason to use preLaunchTask as opposed to name ? If someone wants to have a launch that uses our pre-defined quarkus:dev task, that's fine. No reason that multiple can't exist. The only thing is we shouldn't allow duplicate launches, which we can interpret to mean launches with the same name.
Signed-off-by: Jessica He <jhe@redhat.com>
7b36247 to
1485dac
Compare
rgrunber
left a comment
There was a problem hiding this comment.
Looks mostly fine to me. If @datho7561 is fine with it, feel free to merge.
datho7561
left a comment
There was a problem hiding this comment.
This works well for me. Thanks, Jessica!
Fixes #572
Signed-off-by: Jessica He jhe@redhat.com