79427193

Date: 2025-02-10 13:25:01
Score: 1
Natty:
Report link

For debugging a specific Go test in vscode, create a launch configuration with "mode": "test", "program": "${filePath}", and "args": ["-test.run", "^${selectedText}$"].

This lets you select the test function name, and when you start debugging, it will run only that specific test. The ^ and $ ensure an exact match of the test function name. It becomes precise and easy to use across different test files.

Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: MJepbarov