Skip to content

Allow Play Button to Run as Module #10130

@samclark2015

Description

@samclark2015

The "Run Python File in Terminal" button is handy if creating plain scripts, but when creating packaged applications, it causes confusion. It attempts to run the current file as a Python script which can cause import errors if using dot-style relative imports.

I suggest the button instead executes the first entry in launch.json in a non-debug session, allowing for configurability over its behavior. If no launch configurations are available, it should fallback to its current behavior.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions