简体   繁体   中英

“Run|Debug” Buttons Not Appearing on Visual Studio Code Java Programs

A couple days ago I tried to initialize Visual Studio Code to be able to code in C++ using online instructions. They ended up not working at all, but I had edited some settings files (such as a .json file) in Visual Studio Code that I thought were all C++ specific. Afterwards, however, I no longer have the convenient "run | debug" buttons appearing above any "main" functions that I make in java files. In the past I used to be able to just click run and my program would run in the terminal at the bottom of the screen, as opposed to manually compiling and running the program using a terminal. I am running Windows 10. Does anyone know of any way to get these buttons back?

This is an example of what the two buttons look like, appearing above any main functions in a java program. I also found on the Visual Studio Code website a description of how to begin debugging, attached here , that describes that you need Language Support for Java(TM) by Redhat in order to get these two buttons. I have this extension downloaded, but it is still not working. Please help if you recognize this issue!

First of all, for troubleshooting, actually we need to have a reproduce steps which can understand what happened in your environment. So can you tell us what you have done to your settings first?

Second, there is a setting under common setting tab, that is Java>Debug>Settings>Enable Run Debug Code Lens. Please check whether this option has been unchecked. Although I think it should not be changed by you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM