Skip to content

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

Open

Description

@justarandomgeek

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.

Activity

  1. roblourens commented on Jan 17, 2023

    @roblourens
    Member

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

  2. justarandomgeek commented on Jan 17, 2023

    @justarandomgeek
    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

  3. justarandomgeek commented on Jan 17, 2023

    @justarandomgeek
    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

  4. roblourens commented on Jan 17, 2023

    @roblourens
    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.

  5. justarandomgeek commented on Jan 18, 2023

    @justarandomgeek
    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...

  6. roblourens commented on Jan 18, 2023

    @roblourens
    Member

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

  7. justarandomgeek commented on Apr 18, 2023

    @justarandomgeek
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestRequest for new features or functionality

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions