You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fyi @sandy081@isidorn microsoft/vscode-python#6159 introduced "internalConsoleOptions": "openOnSessionStart" but using this via one of the pre-existing python debug configurations doesn't work out of the box since it has a constraint.
Start debugging a new project or file, it will ask you to choose a debug config
If you choose this first option it gives
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true
}
]
}
Then you realise you want the debug console to open automatically when you start the debugging, you come across microsoft/vscode-python#6159
then you add this to your config and
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true,
"internalConsoleOptions": "openOnSessionStart"
}
]
}
Which doesn't work since
"purpose": [
"debug-test"
],
Isn't in the default config.
Several requests
Make it the default to always launch the debug console
Make it clear in the docs (and in the hints in vscode) that internalConsoleOptions must be used with
"purpose": [
"debug-test"
],
Add a new debug configuration just for debugging tests and make it be
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Debug Tests",
"type": "python",
"request": "launch",
"program": "${file}",
"purpose": [
"debug-test" // the main requirement
],
"console": "integratedTerminal",
"justMyCode": false, // not bothered about this value
"internalConsoleOptions": "openOnSessionStart" // the main requirement
}
]
}
Here is a diff compared to the existing one Python File Debug the currently active Python file
Update the existing Python File Debug the currently active Python file config to include. This is somewhat controversial but although it's incorrect, purpose works both for tests and debug file and therefore there is no downside by doing this.
"purpose": [
"debug-test"
],
Maybe remove this constraint for
"purpose": [
"debug-test"
],
Since I don't see how this is related to launching the Debug console.
The text was updated successfully, but these errors were encountered:
VS Code's "internalConsoleOptions": "openOnSessionStart" setting has no "constraint".
If there is a constraint, then this is introduced by the Python extension.
VS Code's "internalConsoleOptions": "openOnSessionStart" setting has no "constraint". If there is a constraint, then this is introduced by the Python extension.
fyi @sandy081 @isidorn
microsoft/vscode-python#6159 introduced
"internalConsoleOptions": "openOnSessionStart"
but using this via one of the pre-existing python debug configurations doesn't work out of the box since it has a constraint.Start debugging a new project or file, it will ask you to choose a debug config
If you choose this first option it gives
Then you realise you want the debug console to open automatically when you start the debugging, you come across microsoft/vscode-python#6159
then you add this to your config and
Which doesn't work since
Isn't in the default config.
Several requests
internalConsoleOptions
must be used withHere is a diff compared to the existing one
Python File Debug the currently active Python file
Python File Debug the currently active Python file
config to include. This is somewhat controversial but although it's incorrect,purpose
works both for tests and debug file and therefore there is no downside by doing this.Since I don't see how this is related to launching the Debug console.
The text was updated successfully, but these errors were encountered: