Allow customisation of VS Code executable

This commit is contained in:
baldurk
2026-08-13 17:46:44 +01:00
parent ca0ac6157a
commit c97850e39b
5 changed files with 55 additions and 4 deletions
@@ -388,6 +388,12 @@ DECLARE_REFLECTION_STRUCT(BugReport);
":type: str"); \
CONFIG_SETTING_VAL(public, QString, rdcstr, Python_DebugPyDir, "") \
\
DOCUMENT( \
"The path to the VSCode ``code`` command line executable to use." \
"" \
":type: str"); \
CONFIG_SETTING_VAL(public, QString, rdcstr, Python_VSCodePath, "") \
\
DOCUMENT( \
"List of extra directories to write python stubs into.\n" \
"\n:" \
@@ -2432,7 +2432,10 @@ void PythonContext::LaunchDebugger(QWidget *window, PersistantConfig &config, QS
PyGILState_Release(gil);
QString code_path = QStandardPaths::findExecutable(lit("code"));
QString code_path = config.Python_VSCodePath;
if(!QFileInfo(code_path).isExecutable())
code_path = QStandardPaths::findExecutable(lit("code"));
if(!debugger_connected && !code_path.isEmpty())
{