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

testsupport: allow passing additional arguments when launching the debug adapter process #285

Open
justarandomgeek opened this issue Jan 13, 2023 · 7 comments
Labels
feature-request Request for new features or functionality

Comments

@justarandomgeek
Copy link

My debug adapter is part of a multi-function tool, so it needs additional command line arguments to start in DAP mode, but testsupport's DebugClient doesn't appear to have anywhere to pass these additional arguments.

@roblourens
Copy link
Member

Isn't this what spawnOptions is? If not can you be more specific?

@justarandomgeek
Copy link
Author

no, spawnOptions is for all the other properties to pass to spawn, but ther's no argv in it, which is what i need to extend.

For now i've done the hideous hack of passing an array of extra args through an env var: https://github.com/justarandomgeek/vscode-factoriomod-debug/blob/next/test/debug.ts#L15
https://github.com/justarandomgeek/vscode-factoriomod-debug/blob/next/src/cli/main.ts#L22

@justarandomgeek
Copy link
Author

https://github.com/microsoft/vscode-debugadapter-node/blob/main/testSupport/src/debugClient.ts#L97 builds the argv array from only debugAdapterExecutable, leaving no opportunity to extend it

@roblourens
Copy link
Member

Oh, got it. Makes perfect sense, I'd take a PR that adds this. Would have to be another optional argument to the end of the list of constructor args.

@roblourens roblourens added the feature-request Request for new features or functionality label Jan 17, 2023
@justarandomgeek
Copy link
Author

I'm sorry, are you asking me to fix this? I have enough work to do on my debugger already without having to fix the tools i'm trying to use to build it...

@roblourens
Copy link
Member

I'll fix it if I don't get a PR. It would just be faster if someone sent a PR.

@justarandomgeek
Copy link
Author

any chance of this get fixed any time soon? Would be nice to get rid of my weird hacks around it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

2 participants