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

Support for CodeLLDB launch configs #43

Closed
rjra100 opened this issue Nov 22, 2021 · 3 comments
Closed

Support for CodeLLDB launch configs #43

rjra100 opened this issue Nov 22, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@rjra100
Copy link

rjra100 commented Nov 22, 2021

We use CodeLLDB rather than CppTools for debugging. The launch.json configs are mostly the same, and up to version 0.14.2, this worked fine; we just point CMake Test Explorer's cmakeExplorer.debugConfig setting at an LLDB launch config and it'd work ok. As of 0.15 we're getting an error dialog undefined is not iterable (cannot read property Symbol(Symbol.iterator)) when we attempt to debug a test from the test explorer.

I believe the reason is that CodeLLDB takes its environment settings in a different format from cpptools:
CppTools:

    "environment": [
      {
        "name": "<varname>"
        "value": "<blah>"
      }
    ],

CodeLLDB:

    "env": {
        "<varname>": "<blah>"
    }

If I add an empty environment list to the launch config it no longer produces errors, but that's going to be rather confusing! Could you support both formats?

For what it's worth, the same error occurs with a cpptools debug config with no environment list: that's less of a problem since it's created by default, but I think it should still work.

@fredericbonnet
Copy link
Owner

fredericbonnet commented Nov 22, 2021

It looks like a bug caused by cmakeExplorer.extraCtestEnvVars handling in the new version. I only tested it on Windows with cppvsdbg and wrongly assumed that all debug configs used the same environment format, which unfortunately is not the case (I couldn't find any doc on that). I'm gonna fix that ASAP, sorry for the inconvenience!

@fredericbonnet fredericbonnet added the bug Something isn't working label Nov 22, 2021
@fredericbonnet
Copy link
Owner

Latest version should fix the issue, can you confirm it works on your side?

@rjra100
Copy link
Author

rjra100 commented Nov 30, 2021

Looks like it's working again as of v0.15.1. Thanks for the quick response!

@rjra100 rjra100 closed this as completed Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants