Skip to content

Do not pollute shell history with automatically executed debugger commands #88038

@nnsee

Description

@nnsee

Currently, when a debugger is executed (ie by hitting F5), a terminal is opened and the debugger is executed as a command.

This command can get pretty long as it also changes to the working directory and sets some environment variables. Running the Python debugger in a simple project with only one file runs a command which is 243 characters long.

This, however, means that these commands which are not meant to be run by the user but are instead run automatically are still included in the user's shell history file by default.

I propose changing the command generation function prepareCommand() to include a space at the very beginning - on many shells across various distros, $HISTCONTROL is set to not add commands to history if they start with a space character. This also gives some control to the user whether they'd like for the debugger commands to be stored in history or not.

Metadata

Metadata

Assignees

Labels

debugDebug viewlet, configurations, breakpoints, adapter issuesfeature-requestRequest for new features or functionalityverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions