indiejames / vscode-clojure-debug

A VS Code package for developing Clojure code
MIT License
84 stars 6 forks source link

Debug adapter process has terminated unexpectedly #128

Open jink opened 7 years ago

jink commented 7 years ago

Environment

Description

Debug adapter process has terminated unexpectedly

Steps to Reproduce

  1. Clicks start debugger
  2. profiles.clj {:debug-repl {:resource-paths ["C:\Program Files\Java\jdk1.8.0_60\lib\tools.jar"] :repl-options {:nrepl-middleware [debug-middleware.core/debug-middleware]} :dependencies [[debug-middleware "0.4.5"]]}}
  3. launch.json { "version": "0.2.0", "configurations": [

    {
        "commandLine": [
            "lein",
            "with-profile",
            "+debug-repl",
            "repl",
            ":start",
            ":port",
            "5555"
        ],
        "name": "Clojure-Debug",
        "type": "clojure",
        "request": "launch",
        "env": {}
    }

    ] }

  4. settings.json // Absolute path to the lein command "clojure.leinPath": "C:\Users\John\.lein\bin\lein",

    // Absolute path to the tools.jar file (JAVA JDI jar file) "clojure.toolsJar": "C:\Program Files\Java\jdk1.8.0_60\lib\tools.jar",

indiejames commented 7 years ago

Can you replace "lein" with "C:\Users\John.lein\bin\lein" in launch.json and give it another try?

Nadejde commented 7 years ago

@indiejames thank you. Adding the full path to lein in the commandLine helped in my case.

jink commented 7 years ago

@indiejames thank you. Adding "C:\Users\John.lein\bin\lein.bat" worked for me.

johnjelinek commented 7 years ago

The absolute path helped (with double \ in the path). I get a follow-up error in the debug console:

Launch requestListening for transport dt_socket at address: 8030
REPL server launch timed out.
Error encountered performing task 'repl' with profile(s): 'base,system,user,provided,dev,debug-repl'
REPL server launch timed out.
johnjelinek commented 7 years ago

Is there any way to alter the timeout time?

johnjelinek commented 7 years ago

I increased the timeout in project.clj, but after the nREPL loaded, vscode stated: Debug adapter process has terminated unexpectedly again.

johnjelinek commented 7 years ago

Turns out I had a typo: I was missing an extra \ in my lein path in VS Code's settings.

4mitch commented 7 years ago

Hello! Well, I've just installed Leiningen for the first time. And got the same subj error and "Starting RELP" in VS Code status line with demo project. But I don't have "C\Users\[username]\.lein\bin " directory. I only see "c:\Users\[username]\.lein\self-installs\" with leiningen-2.7.1-standalone.jar inside. What does it mean? I have lein.bat file in other directory. Should "clojure.leinPath" show this way?

4mitch commented 7 years ago

Well, I made a value of $lein-path as a directory of lein.bat and subj error has gone.