0

My project is running smoothly in visual code [Tomcat]. But when it comes to debugging it, I have tried adding launch.json and add configuration to it as follows :-

{
"version": "0.2.0",
"configurations": [
    {
        "type": "java",
        "name": "Debug (Launch)",
        "request": "launch",
        "cwd": "${workspaceFolder}",
        "console": "internalConsole",
        "mainClass": "full qualified name",
        "args": ""
    }]}

after pressing F5 for starting debugging, getting error as

Cannot create debug adapter (no executable specified in package.json)

So, Is there any other way to do it ? Need some suggestions.Thanks in advance.

  • Is there some reason you're trying to develop java application in VS Code? Why not use a java ide(IntelliJ, Netbeans, Eclipse). – NeplatnyUdaj Jan 25 '19 at 13:25

1 Answers1

0

I was getting the same error whilst trying to debug standalone java files after following this answer. You do not need to do this anymore as VS Code automatically generates the file .vscode/launch.json under the current directory.

In reality, the debugger was not working for another reason. I had installed the Java Extension Pack but not the RedHat OpenJDK and it is required by The Language Support for Java(TM) by Red Hat.

dbaltor
  • 2,737
  • 3
  • 24
  • 36