Skip to content

Improve the UX for running the current file #655

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions