-
Notifications
You must be signed in to change notification settings - Fork 286
Path manipulation using correct OS path class #477
Conversation
Allow case insensitive path comparison on Windows. Fixes path generation when local is Windows and remote is Posix.
Did it work successfully with you? I mean you can now remote debug a project on Linux from vscode on windows. |
Yes, I can attach VSCode to the ruby-debug-ide instance in docker, and breakpoints are working now. I haven't tested all scenarios though, I'm gonna test Linux to Docker to make sure I didn't break this part. Edit: I can confirm it also work correctly on Linux attached to a debugger in docker |
Please tell me the news because if that worked I'll change my ruby extension source code. |
It does work in both scenarios yes, either having a Windows or Linux running vscode and the ruby debugger running on Linux |
Have you tried to make the project running on windows and vscode running on Linux? |
No, the ruby app is a pain to run on Windows, I'll see if I can test with a sample app |
Try a helloworld app but we want to make sure that there isn't any issues with this. |
Make sense, I won't have time right now, I'll update you tomorrow on this |
I'll wait news from you tomorrow. |
This fixes attaching vscode from a Posix environment to a debugger runing in Windows
I found time to test other scenarios. I found a bug when attaching from Linux to Windows which is now fixed. So attaching VSCode from either Windows or Linux to a debugger running in either Windows or Linux works The only scenario I'm not sure of is if we should always expect to have a remote CWD when the debugger mode is not launch, which I don't think make sense. |
We can set cwd to {workspaceroot} |
Have you crashed into any problems? If you crashed into any problems tell me I can help you. |
I'm done for the day 🙂 |
No, there isn't. Nice work. |
I've applied the last changes. I've also cleaned up a few things (missing semicolon and run Prettier on my changes). I've tested those last changes again between VSCode running on Windows and Linux against a debugger running on Windows and Linux, all the combinations are working properly. |
The last thing Have you tried to run a project on Linux and vs code on another Linux. |
Yes, I've tried Windows to Windows, Windows to Linux, Linux to Windows and Linux to Linux. |
Very good. What about OSX? |
I don't have any Apple device to test with |
OK. very good. so, this pull request didn't run into any problems. |
I was just banging my head against the wall with this same problem. New ruby-on-rails developer, rolled a docker service to run the app, configured the IDE, but then it seemed to ignore my RemoteWorkspaceRoot. I could see the "C:\Users..." path whenever I added a breakpoint. I just ran this version in testing, and can confirm that it now correctly converts my Windows paths to POSIX paths in the console. I am still having issues getting breakpoints to catch as of now, but I'm guessing it's another setting somewhere since I'm very new to this. At the very least, the path conversion seems fixed in this version. |
@DavidGriswoldTeacher Could you post your |
I don't think this is the appropriate spot to try to solve it. I actually
got the breakpoints to catch by disabling byebug temporarily but now I
can't access the thread that has the breakpoints in it to debug window, so
I can't see the variables etc. Googling around I found others with the same
issue, I think it has to do with child processes; there is an issue in the
tracker that talks about something very similar. The app is also on Rails
5.1.1 which a closed bug also blamed for a similar sounding issue, but
migrating it is out of the question for me.
Point is, though I am still having some issues, this PR clearly does what
it is supposed to do and fixed my windows path issue! I won't be able to
work on this for a few days anyway. When I do I may just try a command line
debugger; my needs are actually pretty simple.
…On Sun, May 12, 2019, 21:30 minkir014 ***@***.***> wrote:
@DavidGriswoldTeacher <https://github.com/DavidGriswoldTeacher> Could you
post your launch.json to see where is the problem?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#477 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALWSINWZRCLOPMVMVI4AYQTPVCZBHANCNFSM4HLTU6CQ>
.
|
Please, provide your launch.json I knew what is the problem in it (launch.json) but I want to be sure. Please provide it to see if there is another problem we can solve. |
@hnioche thank you for your work. I'll take a look at this soon! |
Allow case insensitive path comparison on Windows.
Fixes path generation when local is Windows and remote is Posix.
I had issue debugging a ruby application running in a Linux docker environment using visual studio code on Windows. The issue seems to have started with VSCode 1.30
It was caused by the drive letter part of the workspace directory being lower case while the letter drive part of a file being upper case, preventing the path conversion to happen.
While debugging I also noticed that on Posix,
path.join
wasn't converting backslashes to slashes, so I changed the join call to handle this case.