Hello,
Okteto CLI is working great, except I cannot get the remote debugging to work.
I am able to set everything up, and test the SSH connection from within the Rider UI, however, when I try to attach to a remote process, no processes get ever listed. There is just a message at the bottom of the IDE saying Rider is checking for the remote debugging tools. It typically installs those if they are missing.
So I tried using VSCode. With VSCode I can see the remote process (the one I started in the Okteto container using dotnet watch run -c debug), however, when I try to attach to it I get a message about insufficient permissions for vsdbg. From what I found itâs because the okteto container is running as root and I am running a different user in my Linux distro (openSUSE Tumbleweed).
I am not very proficient with Linux, so I couldnât get this to work. But I am wondering if itâs the same issue of root vs non-root user when trying to debug in Rider.
Has anyone ran into this issue or does anyone have Okteto and remote debugging working with JetBrains Rider on Linux?
Hey Maxt! Would you mind sharing your okteto.yaml file, and the error message youâre getting from VSCode? I donât think the root vs non-root is the issue, although itâs hard to discard.
Nice meeting you online! Excited to âhearâ that youâve seen some of our webinars. I hope they were helpful!
Can you share your launch.json configuration? Or how are you configuring the remote debugging? Iâm assuming the error you mention happens when you try to connect the debugger; is that correct?
I havenât configured the debugger in VSCode, I didnât see that part mentioned in the ASP.NET Core tutorial, since it assumes the example repo is being cloned.
This gives me the next step in troubleshooting. Iâll let you know if I get it working.
Thank you for pointing me in the right direction. Iâll get back to you with the results and with the Rider piece of the puzzle.
I was able to get VSCode to work by installing vsdbg in the okteto container and using a slightly modified launch.json from the asp.net core example repo.
I am guessing Rider needs to have the remote debugging tools installed in the Okteto container as well.
Iâll work on figuring out how to do that.
I was able to get Rider to install the remote debug tools, but they are coming up with a Rider specific error (ENUMERATOR_PARENT_PROCESS_PID is not defined) which has nothing to do with Okteto. Iâll have to open a ticket with JetBrains.
Does anyone have okteto remote debugging working with Rider on Linux with a local cluster (kind, minikube, krd, etc.) with the standard .net7 or .net8 SDK image?
I spent quite a bit of time today digging into this and it looks like whatever SSH server comes with Okteto doesnât work wirh JetBrains Rider remote debugging. Or the way itâs configured is not supported.
I had the same exact issue with devespace.sh tool.
So I scripted out installation of either JetBrains SSH Server or OpenSSH (per their documentation) inside the âreplacementâ container, and using eithrer one, I was able to connect, list the processes, and attach the debugger (after forwarding the SSH port manually with kubectl).
Maybe I was doing something wrong, but that was my experience with Rider and Okteto/devspace.sh
@maxt I spent some time tonight, and I think I was able to get it to work. I put the steps I followed on this repository. Itâs not super solid, but I was able to launch the container, install the debug tools, and attach the debugger, and hit a breakpoint.
@ramiro
devspace.sh had the same issue (so whatever SSH server they use, doesnât work with Rider either). I didnât realize you wrote your own SSH server and werenât using some eixsting product like OpenSSH.
But yeah, my experience ended up being same as yours, I had to automate the installation of the JetBrains SSH Server or OpenSSH server and I got both to work.
Maybe you can reach out to JetBrains to see whatâs so special about Rider compared to PyCharm? I am surprised none of the other Okteto users reported this before. Maybe nobody codes in .net? Or maybe nobody debugs their code?
We have community members that use IntelliJ, RubyMines, Goland, and PyCharm. You are the first that mentions Rider . All the dotnet + okteto developers I know use Visual Studio Code.
I have a contact at JetBrains, Iâll try to get more info on this. Thanks for the extended details, glad you have a working setup!