daveleroy / SublimeDebugger

Graphical Debugger for Sublime Text for debuggers that support the debug adapter protocol
MIT License
369 stars 42 forks source link

Connection refused #192

Closed dbonometti closed 1 year ago

dbonometti commented 1 year ago

When I run Debugger Start the debugger console outputs:

Unable to start adapter: [Errno 61] Connection refused
Debugging ended

Node and NPM are in path.

My debugger configuration:

"debugger_configurations": [
  {
    "name": "Launch via npm",
    "type": "node",
    "request": "launch",
    "cwd": "${workspaceFolder}",
    "runtimeExecutable": "npm",
    "runtimeArgs": [ "run", "start" ]
  }
]

My system:

This is the stack trace:

Debugger: Unable to start adapter: [Errno 61] Connection refusedTraceback (most recent call last):
  File "/Users/dbonometti/Library/Application Support/Sublime Text/Packages/Debugger/modules/dap/session.py", line 185, in _launch
    transport = await self.adapter_configuration.start(log=self.log, configuration=self.configuration)
  File "/Users/dbonometti/Library/Application Support/Sublime Text/Packages/Debugger/modules/adapters/js.py", line 62, in start
    return await dap.SocketTransport.connect_with_process(log, command, port)
  File "/Users/dbonometti/Library/Application Support/Sublime Text/Packages/Debugger/modules/dap/transports.py", line 187, in connect_with_process
    raise e
  File "/Users/dbonometti/Library/Application Support/Sublime Text/Packages/Debugger/modules/dap/transports.py", line 181, in connect_with_process
    transport = await SocketTransport.connect_with_retry(log, 'localhost', port)
  File "/Users/dbonometti/Library/Application Support/Sublime Text/Packages/Debugger/modules/dap/transports.py", line 164, in connect_with_retry
    raise exception or core.Error('unreachable')
  File "/Users/dbonometti/Library/Application Support/Sublime Text/Packages/Debugger/modules/dap/transports.py", line 159, in connect_with_retry
    return SocketTransport(log, host, port)
  File "/Users/dbonometti/Library/Application Support/Sublime Text/Packages/Debugger/modules/dap/transports.py", line 149, in __init__
    self.socket.connect((host, port))
ConnectionRefusedError: [Errno 61] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/dbonometti/Library/Application Support/Sublime Text/Packages/Debugger/modules/dap/session.py", line 159, in launch
    await self.launching_async
  File "/Users/dbonometti/Library/Application Support/Sublime Text/Packages/Debugger/modules/core/sublime_event_loop.py", line 13, in __call__
    self.callback(*self.args)
  File "/Users/dbonometti/Library/Application Support/Sublime Text/Packages/Debugger/modules/core/core.py", line 71, in done
    raise e
  File "/Users/dbonometti/Library/Application Support/Sublime Text/Packages/Debugger/modules/dap/session.py", line 187, in _launch
    raise core.Error(f'Unable to start adapter: {e}')
Debugger.modules.core.error.Error: Unable to start adapter: [Errno 61] Connection refused

I added "host": "127.0.0.1" to the configuration, but it gives the same result.

daveleroy commented 1 year ago

From the command palette run Debugger: Show Protocol there might be more info in there