Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Issues / doubts debugging with code server #3639

Unanswered
lhassis asked this question in Q&A
Discussion options

Hi everyone!

I have two questions concerning to debugging with code server:

  1. Is it possible to debug React Application on it?
    I'm trying to debug a react application but an error is shown saying that I need to open on VS Code desktop in order to enable debugging. Are there any steps that I'm missing so I can debug from code-server?
    image

  2. I've started a code server locally with 'yarn watch' command. But when I try do debug a nodejs application, node debugger options are not shown, even though the extension for node debugger is installed. When I run the code server provided by the image (https://hub.docker.com/r/codercom/code-server) the node option is normally shown. Is there any thing I can do to debug node applications running code-server locally?
    image

Thanks in advance!

You must be logged in to vote

Replies: 1 comment 5 replies

Comment options

I'm a simple man, I use console.logs for debugging.

  1. I'm not totally sure on that 🤔 I have never tried to use the debugger with a React application and code-server. If you provide repro steps for both code-server and VSCode, I'm happy to try locally.

  2. Unsure about the wording here. Do you have an application which has a yarn watch script or are you running code-server locally (like contributing to it) and running the yarn watch command to start it up? Again, I haven't tried debugging node applications running locally, but happy to give it a try with some repro steps.

Jokes aside, hoping we can help you figure this out.

You must be logged in to vote
5 replies
Comment options

Thanks for the quick answer @jsjoeio! Below the details you asked for.

  1. The way I debug in VSCode is as detailed in https://code.visualstudio.com/docs/nodejs/reactjs-tutorial . I just set a break point and create the launch.json file, using options provided by the VSCode.
  2. What I was trying to describe is the second scenario you wrote: "running code-server locally (like contributing to it) and running the yarn watch command to start it up". In this scenario, again, debugging follows the same: create a launch.json file with VSCode wizard and just run debug. The strange fact is that when I start it up locally it doesn't show me the Node.js option!
    image
Comment options

Welp. I have good news and bad news. The good news is I was able to reproduce this:

Video

https://youtu.be/5JElROdello

The bad news is I'm not sure how to fix this off the top of my head 🤔

I found this article which might be helpful, but maybe not.

The other thing would be to try replicating this in Codespaces (if you have access). If it happens there, it's an upstream issue. If not, it's a code-server issue

Comment options

Oh and for 2. that's strange. Again I don't use it locally when working on code-server so I don't think I can help much there. Workaround would be to debug using console.logs unfortunately.

Let me know your thoughts though after looking more into 1. Happy to keep bouncing ideas off each other here!

Comment options

Thanks again @jsjoeio !

Well, for 2 I tried an update on nodejs version (since mine was different from that one on the docker image) but it still does not recognize node as a debugger type.
I'm also trying to get access to codespaces so I can try the suggested test for 1. I'll write if I get any news.

Comment options

No prob! Sorry it wasn't better news. Ah bummer. Not sure why that would be 🤔

Sounds good! Keep us posted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /