VS code V2 extension debuging not working when project accessed through mnt folder

Hello,

I migrated my C# project from V1 extension to V2.

I’m having a problem when I try to debug my application that resides on my D drive on Windows. I get to it through the /mnt/d/ folder inside WSL or VS code. The extension succeeds in publishing the application, creating a docker container and pulling it on the device, but after that the application does not start (the run and debug process keeps spinning endlessly without results).

When I try to place the same application inside WSL, for example in the /home/user/app folder and start debugging, everything works normally as it should.

I am using Torizon OS 6.4 and Verdin iMX8M mini SoM

Thanks for your help in advance

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


:handshake:

It seems like the issue arises due to the path where your project is located. When accessing files through the /mnt/d/ folder in WSL, there can be performance and compatibility issues because of the way WSL handles file systems mounted from Windows.

Here are a few steps you can try to resolve this issue:

  1. Move the Project to WSL File System: As you mentioned, placing the application inside the WSL file system (e.g., /home/user/app) works correctly. This is the recommended approach since it avoids the overhead and potential issues of accessing files through /mnt/.

  2. Check File Permissions: Ensure that the files in the /mnt/d/ directory have the correct permissions set for WSL to access and modify them. You can check and modify permissions using the chmod and chown commands in WSL.

  3. Update WSL Configuration: Sometimes, updating the WSL configuration to improve performance might help. You can add the following lines to your .wslconfig file in your Windows user directory to improve file system performance:

    [wsl2]
    filesystem = true
    
  4. Use WSL 2: Ensure you are using WSL 2, as it has better performance and compatibility compared to WSL 1. You can check your WSL version by running wsl --list --verbose in a PowerShell or Command Prompt window.

  5. Check VS Code Settings: Ensure that your VS Code is correctly configured to work with WSL. Open a new WSL terminal and start VS Code from there using the code . command to ensure it is connected to the WSL environment.

By following these steps, you should be able to debug your application more effectively. If the issue persists, keeping the project within the WSL file system is the most reliable solution.

Best regards, Toradex AI Assistant

Hello @fvodopive,

Do I understand it correctly that the same workflow worked fine with the V1 extension and not with V2?
Also, as @ToradexAI suggested, could you check the file permissions of /mnt/d/ directory and compare it with that of /home/user/app folder?

Hello @rudhi.tx

Do I understand it correctly that the same workflow worked fine with the V1 extension and not with V2?

Debugging is working in V2 extension when I put my application in /home/user/app directory but not when I put it in /mnt/d directory also in V2 extension

Also, as @ToradexAI suggested, could you check the file permissions of /mnt/d/ directory and compare it with that of /home/user/app folder?

I checked the permissions and they are fine. I have all permissions in /mnt/d/ directory.

Best Regards

Hello @fvodopive,

Debugging is working in V2 extension when I put my application in /home/user/app directory but not when I put it in /mnt/d directory also in V2 extension

I understand that. But did debugging work fine on V1 extension with the application in /mnt/d/ directory?

Could you please post the output of $ ls -ld /home/user/app/ and also $ ls -ld /mnt/d/app ?

Hello @rudhi.tx

I understand that. But did debugging work fine on V1 extension with the application in /mnt/d/ directory?

I never used V1 extension on WSL, only on Windows so i never tried that part.

Here is outputs of ls -ld commands

Best Regards,

@fvodopive,

I never used V1 extension on WSL, only on Windows so i never tried that part.

I believe if you used V1 extension on Windows, you have certainly used it in WSL, as this is how it is supposed to work.

Anyway, I’m going to check with the IDE team to see if they know anything about this behavior. I will update you as soon as I have an answer.

@fvodopive

Saving projects on a Windows filesystem may cause unexpected behavior, so we recommend saving projects in WSL as you figured it out. This is also documented as a caution on this page. From the Windows Explorer side, you can easily access also his files, as there will be folder Linux with the WSL filesystems, as described here in this Microsoft article. I hope that helps.