★ wanayoo — archive 1999 https://github.com/microsoft/vscode-java-debug/issues/655Nouvelle recherche | Portail wanayoo
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the UX for running the current file #655

Closed
testforstephen opened this issue Sep 10, 2019 · 2 comments
Closed

Improve the UX for running the current file #655

testforstephen opened this issue Sep 10, 2019 · 2 comments
Assignees
Labels

Comments

@testforstephen
Copy link
Contributor

@testforstephen testforstephen commented Sep 10, 2019

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.

@testforstephen testforstephen self-assigned this Sep 10, 2019
@testforstephen testforstephen added this to the 0.22.0 milestone Sep 10, 2019
@Eskibear
Copy link
Member

@Eskibear Eskibear commented Sep 10, 2019

it can fallback the last debug target if no main() method is found in the current file

This might cause confusion, as current active launch configuration is "Current File", but it's going to run a different file.

@testforstephen testforstephen removed this from the 0.22.0 milestone Sep 10, 2019
@testforstephen
Copy link
Contributor Author

@testforstephen testforstephen commented Oct 22, 2019

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 there’s no main() method doesn't exist any more. So i will close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.