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

Add dubugging of the C++ tests #593

Open
NickBettsRandom opened this issue May 9, 2023 · 1 comment
Open

Add dubugging of the C++ tests #593

NickBettsRandom opened this issue May 9, 2023 · 1 comment

Comments

@NickBettsRandom
Copy link

Currently, when the C++ test run they are not running under the debugger (break points are not hit), which makes it hard to find and fix problems. The tests can be run under the debugger by adding the following configuration to the .vscode/launch.json.

    {
      "type": "cppvsdbg",
      "name": "WPILib Test Debug",
      "request": "launch",
      "program": "${workspaceFolder}\\build\\install\\frcUserProgramTest\\windowsx86-64\\debug\\lib\\frcUserProgramTest.exe"
    }

It would be good to have an WPILib: Debug Robot Test command to run them.
Also the existing WPILib: Test Robot Code command does not actually run the tests unless a change has been made to them, which is terribly confusing (and quite odd).
Looking at the extension source this seems like it it should not be too hard, but I'm not familiar with any of the technology being used. If anyone has any hints I may be able to give it a go.

@ThadHouse
Copy link
Member

Also the existing WPILib: Test Robot Code command does not actually run the tests unless a change has been made to them, which is terribly confusing (and quite odd).

This is actually caused by gradle itself, and does the same thing in Java as well. It knows it has ran the tests before and passed, and no code changes have happened since, so it determines that the tests don't need to be reran.

As for the rest, the good thing is the gradle support is already there, so it should be pretty easy to just add vscode support. The bigger issue is changing that likely requires changing the vscode library we created, which we haven't updated in 3 years and has to be pushed by one of us. I'll work on doing that this summer.

It used to be possible to do this before 2022, but it was one thing that was lost in the 2022 rewrite.

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

2 participants