Contribute to debug start experience
Hi VS Code dev here :wave:
Last milestone we have introduced a Start View for debugging. More about this can be found here https://github.com/microsoft/vscode/issues/84677
So when the user has no launch.json file this view should help him start debugging.
This view is currently language agnostic and not very cluttered thus we are slowly looking in opening it up to extensions. We have two options:
- Allow extensions to contribute commands / text to the current view. Those commands would be rendered as additional blue buttons or as some menu
- Allow extensions to contribute a whole view which would be below the start view. The Java extension could choose what to render in that view and it would give a bit more control to the extension. Using context keys this view would only be visible in the "start" experience
What I would be interested in is what Java would like to contribute to improve the start experience. If it is only commands, than I think it makes sense to show those commands in the start view (for example with additional blue buttons). If it is much more then it makes more sense that Java contributes the whole view. What are the biggest pain points that Java users hit when setting up debugging?
Related python discussion: https://github.com/microsoft/vscode-python-debugger/issues/164
Let me know what you think and how you envision the Java debug start experience. Thanks!
Current look of debug start view fyi @testforstephen

This is an interesting topic, we need have a conversation with team first.
// @hexiaokai @akaroml
TL;DR
- Allow contributing a list of values
- Allow contributing extra buttons
- Allow grouping buttons and lists
- Allow text input
- Allow persisting the configurations of a debug session
Here are the scenarios and challenges when Java developers run an application:
- When there is at least one main function found in the workspace A challenge here is when there are multiple main functions defined. Now we ask users to pick one using the quick pick. It would be great if we could contribute a list of entries and let users choose inside the debug panel.
- Run test code with special launchers We need special launchers to launch test cases, Maven goals, etc. So we need to be able to contribute extra launch buttons accordingly.
- Run with parameters Users want to be able to pass parameters to their applications. They want the flexibility of being prompted to key in params before launch
- Persist launch configurations By default, we don't write to launch.json. But users would want to persist the current launch configurations for repeating cases. It would be great if we have an entry to persist the configuration of a debug session.
@fbricon @testforstephen @jdneo @Eskibear please also comment on this issue.
Thanks a lot for feedback. This all makes sense. Imho 4) could be done via a command that your extension could contribute. Also @weinand and @connor4312 are thinking about this for node, so we might introduce a general mechanism to "pin" a used debug configuration. We'll keep you updated. 2) could be done via a test viewlet and it is on our roadmap to investigate testing support https://github.com/microsoft/vscode/wiki/Roadmap#testing
Due to the above I would first focus on 1 and 3 for the start view.
Thanks a lot for feedback. This all makes sense. Imho 4) could be done via a command that your extension could contribute. Also @weinand and @connor4312 are thinking about this for node, so we might introduce a general mechanism to "pin" a used debug configuration. We'll keep you updated. 2) could be done via a test viewlet and it is on our roadmap to investigate testing support https://github.com/microsoft/vscode/wiki/Roadmap#testing
Due to the above I would first focus on 1 and 3 for the start view.
Regarding item 2, here to further clarify. The title should be "Run with special launchers". Test cases is one of the cases and they are already in the Test Explorer. There are other cases like: a. Debug Maven goals using mvnDebug b. Debug webapps in Tomcat ... So there could be a middle man in the launch process and we need to expose it to the users. So the request is the ability to contribute multiple buttons in the panel.
And regarding 4, it would be very helpful to have some UI elements in the panel as the unified entry for the persistence command.