Skip to content

Cannot get debugging to work for any language (Python / Javascript) #210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rohan-dave opened this issue Mar 12, 2019 · 11 comments
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@rohan-dave
Copy link

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.

@rohan-dave rohan-dave added the bug Something isn't working label Mar 12, 2019
@kylecarbs
Copy link
Member

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

@rohan-dave
Copy link
Author

@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

@nol166
Copy link
Contributor

nol166 commented Mar 12, 2019

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

@zigego
Copy link

zigego commented Mar 13, 2019

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.

@bdodroid
Copy link

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

@davefinster
Copy link

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.

This was referenced Mar 17, 2019
@kylecarbs
Copy link
Member

Fixed with the latest release 1.32.0-310!

@jeasonstudio
Copy link
Contributor

image

@kylecarbs New release does not work.

@kylecarbs
Copy link
Member

Hm. Will investigate.

@kylecarbs kylecarbs reopened this Mar 20, 2019
@kylecarbs
Copy link
Member

kylecarbs commented Mar 20, 2019

Related: #301. Found the issue. Fix will come out shortly.

@kylecarbs kylecarbs self-assigned this Mar 26, 2019
@kylecarbs kylecarbs added this to the March 2019 milestone Mar 26, 2019
@kylecarbs
Copy link
Member

Fixed with the latest release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants