Closed
Description
Environment data
- VS Code version: 1.37.1
- Extension version (available under the Extensions sidebar): master 39cf9e0
- OS and version: macOS Mojave 10.14.6
Expected behaviour
Python commands should only be displayed once in the "Python" output channel.
Actual behaviour
Some Python commands (for example linting or formatting) are displayed twice.
Steps to reproduce:
- Start debugging the extension
- Open a python file and enable linting or formatting on save
- Set 2 breakpoints:
- Save the file
- Notice that
this.emit('exec', file, args, options);
is only hit once, but the debugger stops twice onlogger.logProcess()
.
Cause
We register 2 'exec' listeners to the python process:
- In the
create
orcreateActivatedEnvironment
method inPythonExecutionFactory
:
vscode-python/src/client/common/process/pythonExecutionFactory.ts
Lines 31 to 37 in 39cf9e0
- But also in the call to
await this.processServiceFactory.create
:
vscode-python/src/client/common/process/processFactory.ts
Lines 21 to 26 in 39cf9e0