Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 54 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
"mode": "test",
"program": "${fileDirname}",
"env": {
"CGO_ENABLED": "1"
"CGO_ENABLED": "1",
"CC": "C:\\msys64\\mingw64\\bin\\gcc.exe",
"PATH": "${env:PATH};C:\\msys64\\mingw64\\bin"
},
"showLog": false
},
Expand All @@ -50,7 +52,9 @@
"mode": "test",
"program": "${fileDirname}",
"env": {
"CGO_ENABLED": "1"
"CGO_ENABLED": "1",
"CC": "C:\\msys64\\mingw64\\bin\\gcc.exe",
"PATH": "${env:PATH};C:\\msys64\\mingw64\\bin"
},
"args": [
"-test.run",
Expand All @@ -65,7 +69,9 @@
"mode": "test",
"program": "${workspaceFolder}/internal",
"env": {
"CGO_ENABLED": "1"
"CGO_ENABLED": "1",
"CC": "C:\\msys64\\mingw64\\bin\\gcc.exe",
"PATH": "${env:PATH};C:\\msys64\\mingw64\\bin"
},
"args": [
"-test.v",
Expand All @@ -75,6 +81,51 @@
"5m"
],
"showLog": false
},
{
"name": "Debug Current Test Function",
"type": "go",
"request": "launch",
"mode": "test",
"program": "${fileDirname}",
"env": {
"CGO_ENABLED": "1",
"CC": "C:\\msys64\\mingw64\\bin\\gcc.exe",
"PATH": "${env:PATH};C:\\msys64\\mingw64\\bin"
},
"args": [
"-test.run",
"^${input:testName}$",
"-test.v"
],
"showLog": true,
"buildFlags": "-gcflags='all=-N -l'"
},
{
"name": "Debug Test at Cursor",
"type": "go",
"request": "launch",
"mode": "test",
"program": "${fileDirname}",
"env": {
"CGO_ENABLED": "1",
"CC": "C:\\msys64\\mingw64\\bin\\gcc.exe",
"PATH": "${env:PATH};C:\\msys64\\mingw64\\bin"
},
"args": [
"-test.run",
"${command:go.test.cursor}"
],
"showLog": false,
"buildFlags": "-gcflags='all=-N -l'"
}
],
"inputs": [
{
"id": "testName",
"description": "Test function name",
"default": "TestInstrumentWithLexer",
"type": "promptString"
}
]
}
25 changes: 24 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,31 @@
// Go language server (gopls) settings
"gopls": {
"build.env": {
"CGO_ENABLED": "1"
"CGO_ENABLED": "1",
"CC": "C:\\msys64\\mingw64\\bin\\gcc.exe"
}
},
// Go extension debugging configuration
"go.delveConfig": {
"apiVersion": 2,
"showGlobalVariables": true
},
// Ensure Go test runner uses CGO
"go.testEnvVars": {
"CGO_ENABLED": "1",
"CC": "C:\\msys64\\mingw64\\bin\\gcc.exe",
"PATH": "${env:PATH};C:\\msys64\\mingw64\\bin"
},
// Go build tags and flags
"go.buildTags": "",
"go.buildFlags": ["-ldflags", "-s -w"],
"go.testFlags": ["-v"],
"go.testTimeout": "300s",
// Additional settings to help with debugging
"go.useLanguageServer": true,
"go.alternateTools": {},
"go.enableCodeLens": {
"runtest": true
}
}

32 changes: 32 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@
"label": "Unit Test",
"type": "shell",
"command": "go test -failfast -p 1 -timeout=300s -parallel=1 .${pathSeparator}${relativeFileDirname}${pathSeparator}... -coverprofile='coverage.out' -json | tparse -all -progress",
"options": {
"env": {
"CGO_ENABLED": "1",
"CC": "C:\\msys64\\mingw64\\bin\\gcc.exe",
"PATH": "${env:PATH};C:\\msys64\\mingw64\\bin"
}
},
"problemMatcher": [
"$go"
],
Expand All @@ -43,6 +50,31 @@
"focus": true
}
},
{
"label": "Debug Test Build",
"type": "shell",
"command": "go",
"args": [
"test",
"-c",
"-gcflags",
"all=-N -l",
"./${relativeFileDirname}"
],
"options": {
"env": {
"CGO_ENABLED": "1",
"CC": "C:\\msys64\\mingw64\\bin\\gcc.exe",
"PATH": "${env:PATH};C:\\msys64\\mingw64\\bin"
}
},
"group": "test",
"presentation": {
"reveal": "always",
"panel": "shared"
},
"problemMatcher": ["$go"]
},
{
"label": "Coverage Report",
"type": "shell",
Expand Down
69 changes: 0 additions & 69 deletions internal/instrument/injector.go

This file was deleted.

Loading