Skip to content

debug: prompt users with helpful info when launch is requested without main or test packages #94

@sivan-koren

Description

@sivan-koren

Is your feature request related to a problem? Please describe.
If the active tab does not contain the main package when we start debugging the debugger exits with the following message:
go run: cannot run non-main package

This forces the user to change tabs before debugging, distracting from the code of interest.

Describe the solution you'd like
When debugging starts, all currently open tabs should be checked for a main package and if found the file associated with that tab should be passed to go run instead of the file associated with the active tab.

Describe alternatives you've considered
Custom workspace settings maybe?

Metadata

Metadata

Assignees

No one assigned

    Labels

    DebugIssues related to the debugging functionality of the extension.FeatureRequestNeedsFixThe path to resolution is known, but the work has not been done.debug/configIssues for config discrepancies b/n settings.json, launch.json, launch with F5, run test, debug test

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions