microsoft / microsoft/vscode-java-debug
VSCode and folders in repository from GitHub
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 591
- フォーク
- 429
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 19
説明
First of all I'm not an expert, but I will try to explain my issue as well as I can. I'm not sure if it's a bug, but I still need help to figure it out.
I was working with a GitHub-repository with standalone .java-files (no Java-project, Maven etc.). I'm a student, and so far we are programming Java by making different classes in different .java-files, that works together by being in the same folder. Then I changed the name of the repository, and added some folders within the repository and moved my .java-files into one of those folders. Then I tried to run the my program, by hitting "run" on in the file that contain my "static void main-method". It then returned a "fileNotFoundException", because the program I coded was trying to read from a .txt-file inside the folder. The program had worked before I renamed the repository and moved the files into the folder. After some googling, I found out that the issue was that I moved the .txt file, and that this could be fixed by deleting the directory "Library/Application Support/Code/User/workspaceStorage". So I did, and it didn't fix the problem, and created another problem, which is now the problem that I need help with. When I open my GitHub-repository (which I have cloned to my Mac) in VSCode it opens fine, and I can open the folders inside the repository in the file-explorer in VSCode. But when I open one of the .java-files within one of those folders, it seems like VSCode sets this folder to a main folder or something, because when I go into one of those other folders inside the repository, and open one of the .java files there, then VSCode says that "filename.java is not on the classpath of project nameOfProject, only syntax errors are reported". But I have not created a project or anything, I just have .java-files inside the same folder, and they work together that way. So how do I fix this issue, because I didn't have a problem with this before, and it reported all sort of errors, not only syntax error
Environment
- Operating System: MacOS 10.15.4
- JDK version: 1.8.0_231
- Visual Studio Code version: 1.43.2
- Java extension version: 0.8.1
- Java Debugger extension version: 0.25.1
Steps To Reproduce
- Open my GitHub-repository that has been cloned to my computer.
- Open a .java-file within a subfolder in the repository.
- Open a .java-file inside another of the subfolders in the repository.
- Try to run a file with static void main-method in it.
[attach a sample project reproducing the error]
[attach logs]
I try to add a logg here, hope this is the correct one
Current Result
Expected Result
Additional Informations
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、Java extension と Java Debugger extension を使用して VS Code 1.43.2 で動作を再現します。クローンしたリポジトリを開き、次に別々のサブフォルダーにある Java ファイルを開いて、static void main メソッドを含むファイルを実行します。リンクされたログと workspaceStorage の詳細を確認し、ファイルがプロジェクトのクラスパス外として報告される理由を特定します。再現可能な原因と文書化された解決策を特定できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, typescript, vscode
- 領域
- devtools
- issue の種類
- バグ
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100