Code-server: Cannot get debugging to work for any language (Python / Javascript)

Created on 12 Mar 2019  路  11Comments  路  Source: cdr/code-server

I am currently running Coder through a docker container on my local machine and I would like to debug Python in it.

Here are the steps I took:

  1. Installed the ms-python Python extension through the marketplace.
  2. Installed the Python language through the terminal in the IDE via apt-get command.
  3. Click on "Start without Debugging" or "Debugging" for a simple Hello World program.

The IDE throws an errors as below:
"events.js:183
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE 0.0.0.0:8443
at u.setupListenHandle [as _listen2] (net.js:1360:14)
at listenInCluster (net.js:1401:12)
at doListen (net.js:1510:7)
at _combinedTickCallback (internal/process/next_tick.js:142:11)
at process._tickCallback (internal/process/next_tick.js:181:9)events.js:183
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE 0.0.0.0:8443
at u.setupListenHandle [as _listen2] (net.js:1360:14)
at listenInCluster (net.js:1401:12)
at doListen (net.js:1510:7)
at _combinedTickCallback (internal/process/next_tick.js:142:11)
at process._tickCallback (internal/process/next_tick.js:181:9)
"

The same error occurs with Javascript as well.

bug

Most helpful comment

I've noticed this behavior as well. I changed the running port of code-server to 8440 and while this removes the Error: listen EADDRINUSE 0.0.0.0:8443 errors observed earlier, now I just get an infinitely running blue bar sliding left to right at the top of the Debug sidebar.

Other aspects such as code completion work and I can run dlv (for context, this is Go) from the terminal. There doesn't appear to be any output regarding errors that I can find.

All 11 comments

Interesting. Seems to be attempting to bind on port 8443. Can you try running code-server on a different port?

@kylecarbs Still getting the same error even though I am running it on port 9000 locally.
Here's the docker run command:

docker run -p 127.0.0.1:9000:8443 -v "/Users/rdave/ide:/root/project" codercom/code-server code-server --allow-http --no-auth

does it happen if you used 0.0.0.0 instead of 127.0.0.1? @rohan-dave

Edit Nevermind, saw your host IP in the original post

Run binary on my Mac and Linux, debug Python work fine, but debug node.js and golang not working. Both work fine with local vscode, but nothing get from code-server.

I also cant get Node.js to debug in editor. I've tried on 3 different servers now (Debian 8, Ubuntu 16.10, Ubuntu 18.04) and all three just wont debug.

There is no error message given in terminal either. It just pops up the small debug control panel for a second then the panel disappears and nothing happens.

I can run node --inspect in the built in terminal but cant attach to vscode even with Debug > Node: Auto Attach enabled in settings.

I dont know if this might apply to this issue but I do get this error pretty much immediately after starting code-server on all three servers, even on a fresh setup with no projects opened:
ERROR SHARED stderr {"data":"Uncaught Exception: Error: Unexpected end of JSON input\n\nSyntaxError: Unexpected end of JSON input\n at JSON.parse (<anonymous>)\n at pfs_1.readFile.then.contents (eval at exports.requireModule (/home/{{USR}}/vscode/code-server-1.32.0-245-linux-x64/code-server:468:27660), <anonymous>:77277:45)\n at <anonymous>\n at Timeout.setTimeout [as _onTimeout] (eval at exports.requireModule (/home/{{USR}}/vscode/code-server-1.32.0-245-linux-x64/code-server:468:27660), <anonymous>:52540:31)\n at ontimeout (timers.js:498:11)\n at tryOnTimeout (timers.js:323:5)\n at Timer.listOnTimeout (timers.js:290:5)\n"}

121

I've noticed this behavior as well. I changed the running port of code-server to 8440 and while this removes the Error: listen EADDRINUSE 0.0.0.0:8443 errors observed earlier, now I just get an infinitely running blue bar sliding left to right at the top of the Debug sidebar.

Other aspects such as code completion work and I can run dlv (for context, this is Go) from the terminal. There doesn't appear to be any output regarding errors that I can find.

Fixed with the latest release 1.32.0-310!

image

@kylecarbs New release does not work.

Hm. Will investigate.

Related: https://github.com/codercom/code-server/issues/301. Found the issue. Fix will come out shortly.

Fixed with the latest release.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RealSlimMahdi picture RealSlimMahdi  路  3Comments

infogulch picture infogulch  路  3Comments

avelino picture avelino  路  3Comments

pchecinski picture pchecinski  路  3Comments

chrischabot picture chrischabot  路  3Comments