Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImprove the UX for running the current file #655
Comments
This might cause confusion, as current active launch configuration is "Current File", but it's going to run a different file. |
|
Previously we have a bug on searching the main classes in the standalone invisible project, see the PR microsoft/java-debug#305. After it's fixed, the current behavior is prompting the possible main classes list when your current file doesn't contain any main method. The complaint |
The java debugger provided a launch template to run the current file.
{ "type": "java", "name": "Debug (Launch) - Current File", "request": "launch", "mainClass": "${file}" }when the user executed a debug session and then move to a different class, and hit F5, VS Code will try to find the main() method in the new file, which is good. However in case the new class doesn’t have the main() method, VS Code will report error saying there’s no main() method. It would be nice if it can fallback the last debug target if no main() method is found in the current file, instead of requiring user to go back to pervious file for starting the debug.