VSCode debugger

I have been trying to use the debugger in VSCode, but every time I try to use it, it says that it couldn’t find a class with the main method. Even when I try to add the main method, it still doesn’t work.

Are you running the WPILib Debug Robot Code command? See http://wpilib.screenstepslive.com/s/currentCS/m/java/l/242588-debugging-a-robot-program

I just tried that and this is what shows up in the terminal:
The terminal process terminated with exit code: 1

I’m going to need more than that to help… can you show the entirety of the output?

That is the only thing that changes in the program, no errors, no warnings, it only says that it was terminated with code:1, I really can’t provide any more outputs.

As a second sample point, we have been using the java debug functionality regularly, so I do not believe there is anything fundamentally broken about VSCode or WPILib.

Note there are multiple console tabs, plus RIOlog. No messages in any of them?

Nope, but it turns out, expanding the console revealed that the entire code was the following:

Executing task in folder New folder: gradlew deploy -PdebugMode -PteamNumber=6519 --offline -Dorg.gradle.java.home=“C:\Users\Public\frc2019\jdk” <

‘gradlew’ is not recognized as an internal or external command,
operable program or batch file.
The terminal process terminated with exit code: 1

Ah. You likely have the wrong folder open in vscode. You need the one with gradlew.bat and build.gradle as the root folder. Those cannot be in a subfolder

How can I change that though, I have no idea, and nothing is new on my desktop, and nothing that I can see has changed.

File->Open Folder (select the proper folder)

Now the debugger is working, but the first problem I had is back in where the imports aren’t recognized.

Make a new project, import your code, but NOT the vendordeps folder. Reinstall the libraries in the new project. I had a similar problem, and that’s what fixed it.