-
Notifications
You must be signed in to change notification settings - Fork 136
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
Cannot debug a single file when no workspace folder is opened #832
Comments
Have you installed Java Extension Pack including the debugger extension? Please follow this: https://code.visualstudio.com/docs/java/java-tutorial#_running-and-debugging-your-program Let me know if it works. BTW, it's running, awaiting for user input. Looks like you are running Java program from other extension (like CodeRunner). |
Thank you for your early response😄. Yes i have installed all the needed extensions, i still am facing the same problem. |
We launch your application in TERMINAL view, could you check your TERMINAL view? |
Screen.Recording.2021-12-01.at.16.31.09.mov |
@VivekHalakatti You were using another approach (probably provided by other extensions) to run your project, NOT provided by our extensions. |
VSProblem.mov |
Please open a folder containing this file. Otherwise it's working in lightweight mode (indicated by the rocket icon in bottom right corner). |
@testforstephen I can simply reproduce it by dragging in a .java file without opening any folder.
We should probably optimize debugger extension for such case. Beginners might get stuck on this due to silent failure. |
Basically it's using output channel, which doesn't have the capability to interact with user. You'd better ask author of code runner about it. |
There is a regression bug about single file debugging support. redhat-developer/vscode-java#2231 If you opened a single file without a workspace folder, the debugger extension will be broken. The upstream Java language support for Java extension has fixed it and will be released in 1.2.0. |
Thank you so much @Eskibear @testforstephen |
Closing it since Java Language Support extension @1.2.0 version has fixed this issue. |
Environment:Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39)
Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing)
Step to Reproduce:I have installed JDK correctly and all files are in the right directory. But i am unable to run any java programs using text editors such as VS code, sublime.They do not show any error either! just blank space.i have tried multiple text editors with java code and none are working. But the same works when done in terminal explicitly
Expected Behavior:They have too run atleast simple programs other than printing strings.I am unable to do anything
other than printing strings.Incapable to show the outputs of the performed computations
Actual Behavior:No output of computations other than string.
Related Issues: <!-- Not just with visual code , happens with sublime too.
![Screenshot 2021-11-30 at 12 33 44 AM](https://user-images.githubusercontent.com/65499521/143931433-d2bee4bf-34b7-4d6b-b79e-7a5d1f77d73c.png)
-->The text was updated successfully, but these errors were encountered: