Skip to content

Run/debug multiple single file programs with the same name #1645

Closed

Description

@arruw

I have a folder structure where each example lives inside a folder with a single java file that is always named Solution.java. Problem is that because classes are cached I have to manually clean cache before executing 2nd, 3rd, ... example, is there a way to configure VS Code to support such case, without changing folder structure and file names?

Launch configuration:

{
      "name": "Java",
      "type": "java",
      "request": "launch",
      "mainClass": "${file}",
      "cwd": "${fileDirname}"
    }

Folder structure:

root/
  example1/
    Solution.java
  example2/
    Solution.java

Activity

  1. fbricon commented on Oct 4, 2020

    @fbricon
    Collaborator

    use packages, example1 and example2.
    alternatively, open example1 folder, then add example2 to the workspace

  2. fbricon commented on Oct 4, 2020

    @fbricon
    Collaborator

    Closing as running/debugging code is outside the scope of vscode-java.
    Please open a ticket in https://github.com/microsoft/vscode-java-debug/issues

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions