In OOD, I installed VS Code interactive app and code-server works fine. But when I try to install ms-python extension to use python debugger, the extension is not activated and stuck after printing “Activating Extension”.
When I launch code-server without using ood and just using bash, the extension is activated and runs well without any problem. It only happens when I launch code-server with OOD interactive app.
#!/usr/bin/bash -l
<%
# Set our working directory.
working_dir = Pathname.new(context.working_dir)
code_server_version = context.version
# Ensure that code-server always starts up in either a user defined directory or the home directory.
if ! working_dir.exist?
working_dir = Pathname.new(ENV['HOME'])
elsif working_dir.file?
working_dir = working_dir.parent
end
%>
CODE_SERVER_DATAROOT="$HOME/.local/share/code-server"
mkdir -p "$CODE_SERVER_DATAROOT/extensions"
# Expose the password to the server.
export PASSWORD="$password"
# Print compute node.
echo "$(date): Running on compute node ${compute_node}:$port"
#
# Start Code Server.
#
echo "$(date): Started code-server"
code-server \
--auth="none" \
--bind-addr="0.0.0.0:${port}" \
--disable-telemetry
--user-data-dir="$CODE_SERVER_DATAROOT" \
--log debug \
"<%= working_dir.to_s %>"
System spec
OS: Ubuntu 20.04
code-server version: 4.10.1 (latest)
extension: ms-python 2023.4.0 (default version in extension marketplace)
Python: 3.8
OOD version: 2.0.29
Also quickly googling around this seems to be a rather common issue. There are some hacks around your settings.json file, but IDK what to enable/try through this forum. I’d suggest you also googling this and you’ll get several results to investigate.
I tried again and again to find out the reason of the issue.
Recently, I found out that remote extension works fine when I access to code-server directly via worker_node_ip:port instead connecting with OOD dashboard session card.
It seems like accessing to python language server behind reverse proxy of ood rnode interactive app is not working well.
Thanks for looking into it more! Yes that would seem to be an issue.
I would wonder if there’s another way to boot the language server. For example the ruby extension I use uses stdio to communicate. So I’m wondering if there’s a similar setting for python such that the remove vscode instance (on your compute node) can talk to the language server (also on the compute node) through some other mechanism other than http.