Change default path for VS Code workspace files [workspaceStorage]?

I am desperately trying to debug a Java Tomcat application, run in a local network of an enterprise, using VS Code, and am using a Tomcat extension to do the job:

  • The Tomcat extension saves a temporary copy of the Tomcat server and a web application in the workspace folder of VS Code:
    \\networkDriveAddress...\...\name.home\Redirected_Profile\AppData\Code\User\workspaceStorage\ProjectId\adashen.vscode-tomcat\tomcat\apache-tomcat-7.0.4DEVELOPMENT\webapps\myWebAppName\...

It seems Tomcat or Windows refuses to process this because the path to the java classes [below] is too long and I assume this because:

...\myWebAppName\WEB-INF\classes\myPackage\mySubPackage\mySubSubPackage\myClass.class
  • It works if I deploy a webapp with a small class tree [shorter paths]
  • It works if I delete the folder with classes from myWebAppName, leaving only index.html
  • If I try to copy around ...\classes\..., Windows refuses to copy because the path is too long


How can I change the default workspaceStorage for VS Code:

  • From: \\networkDriveAddress\...\...\User\
  • To: E:\wspace\
2

1 Answer

How can I change the default workspaceStorage for VS Code:

  • From: \networkDriveAddress......\User\
  • To: E:\wspace\

You should be able to use code --user-data-dir E:\wspace\, however, that will change the directory for all user data. workspaceStorage is just one storage element that Visual Studio code uses.

Sources:

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like