vscode-clojure-debug icon indicating copy to clipboard operation
vscode-clojure-debug copied to clipboard

Debug adapter process has terminated unexpectedly

Open jink opened this issue 7 years ago • 9 comments

Environment

  • VSCode Version: 1.11.12
  • OS Version: Windows 10
  • Clojure Extension Version: 0.2.0

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",

jink avatar May 01 '17 20:05 jink

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

indiejames avatar May 01 '17 23:05 indiejames

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

Nadejde avatar May 06 '17 07:05 Nadejde

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

jink avatar May 08 '17 21:05 jink

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 avatar May 14 '17 03:05 johnjelinek

Is there any way to alter the timeout time?

johnjelinek avatar May 14 '17 03:05 johnjelinek

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

johnjelinek avatar May 14 '17 04:05 johnjelinek

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

johnjelinek avatar May 14 '17 04:05 johnjelinek

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 avatar Sep 26 '17 18:09 4mitch

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

4mitch avatar Sep 27 '17 14:09 4mitch