Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

Allow debugging of different files with main function from the same directory #1229

@MZhoume

Description

@MZhoume

Thanks again for this amazing extension.

Regarding the debugging adapter, it would be nice to be able for us to debug a single .go file.

let dlvArgs = [mode || 'debug']; if (mode === 'exec') { dlvArgs = dlvArgs.concat([program]); } dlvArgs = dlvArgs.concat(['--headless=true', '--listen=' + host + ':' + port.toString()]); if (launchArgs.showLog) { dlvArgs = dlvArgs.concat(['--log=' + launchArgs.showLog.toString()]); } if (launchArgs.cwd) { dlvArgs = dlvArgs.concat(['--wd=' + launchArgs.cwd]); } if (launchArgs.buildFlags) { dlvArgs = dlvArgs.concat(['--build-flags=' + launchArgs.buildFlags]); } if (launchArgs.init) { dlvArgs = dlvArgs.concat(['--init=' + launchArgs.init]); } if (launchArgs.backend) { dlvArgs = dlvArgs.concat(['--backend=' + launchArgs.backend]); } if (launchArgs.args) { dlvArgs = dlvArgs.concat(['--', ...launchArgs.args]); }

The program is only evaluated if the mode is set to exec, but not debug. However, delve supports debug specific file: del debug single.go.

Please let me know if that can be implemented. Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions