Giter VIP home page Giter VIP logo

Comments (4)

matepek avatar matepek commented on June 25, 2024

Hey, Wow you are so good achieving all of this.
I will add this feature.
Also I would like to ask you to share some How To with us. All that stuff you achieved I would put to the SUPPORT.md file in this repo.

from vscode-catch2-test-adapter.

voltamund avatar voltamund commented on June 25, 2024

Thanks for the update.

Here is an example of a testMate.cpp.debug.configTemplate that can be used for remote debugging of a test.
I have added some comments. This could be extended with setupCommands if more control over gdb is needed.

"testMate.cpp.debug.configTemplate": {
    "variables": {
        // Take active ssh target from ms-vscode.cpptools extension
        "device": "${command:C_Cpp.activeSshTarget}",
        "localBindAddress": "localhost",
        "gdbPort": "2345",
        //
        // targetDir is the directory on the remote device where rsync will put the test executable
        "targetDir": "/tmp/testing",
        //
        // targetFilePath is the full path of the test executable on the remote device,
        // ${filename} is the just the filename part from ${exec}
        "targetFilePath": "${targetDir}/${filename}"
    },
    "type": "${assert:testMate.cpp.debug.configTemplate doesn't support this platform!}",
    "linux": {
        "type": "cppdbg",
        "MIMode": "gdb",
    },
    "miDebuggerPath": "gdb-multiarch",
    "miDebuggerServerAddress": "${localBindAddress}:${gdbPort}",
    "deploySteps": [
        {
            // create directory for rsync
            "type": "ssh",
            "host": "${device}",
            "command": "mkdir -p ${targetDir}"
        },
        {
            // rsync test executable (${exec}) to remote device
            "type": "shell",
            "command": "rsync --archive --quiet \"${exec}\" ${device}:\"${targetFilePath}\""
        },
        {
            // run test executable under gdb server
            "type": "ssh",
            "host": {
                "hostName": "${device}",
                "localForwards": [
                    {
                        "bindAddress": "${localBindAddress}",
                        "port": "${gdbPort}",
                        "host": "localhost",
                        "hostPort": "${gdbPort}"
                    }
                ]
            },
            "command": "gdbserver --once :${gdbPort} ${targetFilePath} ${argsStr}",
            "continueOn": "Listening on port",
        }
    ]
}

from vscode-catch2-test-adapter.

matepek avatar matepek commented on June 25, 2024
Fixed in v4.9.0.

This issue was mentioned in CHANGELOG.md under a released entry so it is assumed to be fixed.
User verifications are always welcome.

from vscode-catch2-test-adapter.

voltamund avatar voltamund commented on June 25, 2024

Thank you very much for this new feature. It works without issues for me.

from vscode-catch2-test-adapter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.