简体   繁体   English

Visual Studio代码Java程序中未出现“运行|调试”按钮

[英]“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. 几天前,我尝试初始化Visual Studio Code,以便能够使用在线指令在C ++中进行编码。 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. 他们最终根本没有工作,但我在Visual Studio Code中编辑了一些我认为特定于C ++的设置文件(例如.json文件)。 Afterwards, however, I no longer have the convenient "run | debug" buttons appearing above any "main" functions that I make in java files. 然而,之后,我不再使用方便的“运行|调试”按钮出现在我在java文件中创建的任何“主”函数之上。 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? 我正在运行Windows 10.有没有人知道如何让这些按钮恢复?

This is an example of what the two buttons look like, appearing above any main functions in a java program. 这是两个按钮的外观示例 ,出现在java程序中的任何主要函数之上。 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. 我还在Visual Studio Code网站上找到了如何开始调试的说明,附在此处 ,描述了您需要Redhat的Java(TM)语言支持才能获得这两个按钮。 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. 其次,在公共设置选项卡下有一个设置,即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. 虽然我认为你不应该改变它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio Code window 没有出现 - Visual Studio Code window is not appearing 调试会话后,下拉菜单未出现在Visual Studio 2010中 - Pull down menus not appearing on Visual Studio 2010 after debug session Windows 上的 Bash - 使用 Visual Code 或 Visual Studio 调试 python 文件 - Bash on Windows - debug a python file with Visual Code or Visual Studio 如何在Visual Studio 2015和Windows 10上运行DirectX代码示例? - How to run DirectX code samples on Visual Studio 2015 and Windows 10? UWP 应用程序在 Visual Studio 调试模式下工作,但发布版本无法运行,缺少 DLL (C#) - UWP App works in Visual Studio debug mode, but the release build won't run, missing DLL (C#) 从W10和Bash在“ Visual Studio代码”中运行Javascript - Run Javascript in “Visual Studio Code” from W10 and Bash Visual Studio Code 不会自动为 java 语言创建 bin 文件夹、file.classpath 和 file.settings - Visual Studio Code not automatically create bin folder, file .classpath and file .settings for java language Visual Studio调试-System.Diagnostics.Process挂在WaitForExit上 - Visual Studio debug - System.Diagnostics.Process hangs on WaitForExit 无法运行Visual Studio模拟器 - Can't run Visual Studio Emulator 是否可以在 Visual Studio Code 上使用 Docker 工具箱? - Is it possible to use Docker Toolbox on Visual Studio Code?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM