Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

edit default .vscode/launch.js "Launch Package" program work dir #3387

Open
yimiaoxiehou opened this issue May 14, 2024 · 2 comments
Open

edit default .vscode/launch.js "Launch Package" program work dir #3387

yimiaoxiehou opened this issue May 14, 2024 · 2 comments
Milestone

Comments

@yimiaoxiehou
Copy link

By default, the working directory for the “Launch Package” program in .vscode/launch.js is set to “${fileDirname}”, which is the .vscode directory. This is merely the configuration directory for VSCode, not the base directory of the Go project, so it cannot directly run the project and always requires modification. I believe this is not very convenient for developers.

@gopherbot gopherbot added this to the Untriaged milestone May 14, 2024
@yimiaoxiehou
Copy link
Author

#3388

@hyangah
Copy link
Contributor

hyangah commented May 16, 2024

To clarify - the ${fileDirname} is the current opened file's folder path, not the .vscode/launch.json's directory.

If you move the focus to any source file of tested or built package, use of ${fileDirname} allows to debug the package.
The intention was to be able to use the same config for any packages in the project as users often work on multiple packages. OTOH, I am now confused by the use of placeholder with ${fileDirname}.

I personally think ${fileDirname} makes more sense when working with "mode": "auto" - which switches the debug mode depending on the open source code, but I see the other side of an argument too since this is to supply a "template", rather than the final launch configuration.

@suzmue This is separate from the configuration used by the no-config debug or test debugging, right? Then, I am fine with this change.

@hyangah hyangah modified the milestones: Untriaged, v0.42.0 May 23, 2024
yimiaoxiehou added a commit to yimiaoxiehou/vscode-go that referenced this issue May 30, 2024
yimiaoxiehou added a commit to yimiaoxiehou/vscode-go that referenced this issue May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants