Skip to content

Commit 71b4440

Browse files
committed
Remove default flags
1 parent f51cf49 commit 71b4440

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

pkg/debugger/program.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@ import (
2020
"github.com/sunfmin/mcp-go-debugger/pkg/types"
2121
)
2222

23-
// Default build flags for compiling with optimizations disabled
24-
const (
25-
defaultBuildFlags = "-gcflags=all=-N"
26-
// Test build flags need to be different since -l can't be used with -c
27-
defaultTestBuildFlags = "-gcflags=all=-N"
28-
)
29-
3023
// LaunchProgram starts a new program with debugging enabled
3124
func (c *Client) LaunchProgram(program string, args []string) types.LaunchResponse {
3225
if c.client != nil {
@@ -372,7 +365,7 @@ func (c *Client) DebugSourceFile(sourceFile string, args []string) types.DebugSo
372365
logger.Debug("Compiling source file %s to %s", absPath, debugBinary)
373366

374367
// Compile the source file with output capture
375-
cmd, output, err := gobuild.GoBuildCombinedOutput(debugBinary, []string{absPath}, defaultBuildFlags)
368+
cmd, output, err := gobuild.GoBuildCombinedOutput(debugBinary, []string{absPath}, "")
376369
if err != nil {
377370
logger.Debug("Build command: %s", cmd)
378371
logger.Debug("Build output: %s", string(output))
@@ -442,7 +435,7 @@ func (c *Client) DebugTest(testFilePath string, testName string, testFlags []str
442435
}()
443436

444437
// Compile the test package with output capture using test-specific build flags
445-
cmd, output, err := gobuild.GoTestBuildCombinedOutput(debugBinary, []string{testDir}, defaultTestBuildFlags)
438+
cmd, output, err := gobuild.GoTestBuildCombinedOutput(debugBinary, []string{testDir}, "")
446439
response.BuildCommand = cmd
447440
response.BuildOutput = string(output)
448441
if err != nil {

0 commit comments

Comments
 (0)