尝试在Visual Studio代码中调试Java代码时出现错误。错误如下
build failed, do you want to continue?
Run Code Online (Sandbox Code Playgroud)
我曾尝试清除工作区,但无法正常工作。请,我该如何解决这个问题?
我最近一直在使用GDB来调试C++程序。对于标准用法,我通常这样做:
$ cd compiledir
$ compilescript
$ gdb compiled.out
$ run inputfile
Run Code Online (Sandbox Code Playgroud)
compilescript是一个程序,用于编译我正在开发的特定软件的代码,并且仅适用于Compiledir。它读取外部文件以获取编译器标志。对于 gdb,我包括了必要的-g标志。这适合我通过文本界面进行调试。然而,与 IDE 相比,这个文本界面使用起来越来越令人沮丧,而且我知道 Visual Studio 默认使用 gdb 作为后端来调试 C++ 文件。
首先,我让 Visual Studio 生成默认的 C++ 调试配置并尝试更改命令,但我不知道它在做什么,并且似乎没有太多关于制作自定义构建/调试配置的文档,特别是对于VScode 的 Linux 版本。
目前我有:
launch.json(默认)
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "g++ - Build and debug active file",
"type": "cppdbg",
"request": "launch", …Run Code Online (Sandbox Code Playgroud)