提交 6e36c82a 编写于 作者: I isidor

debug: if last active workspace has no launch configurations try to find another one

fixes #46212
上级 5f8b6974
......@@ -138,9 +138,9 @@ export class StartAction extends AbstractDebugAction {
if (!launch) {
const rootUri = this.historyService.getLastActiveWorkspaceRoot();
launch = configurationManager.getLaunch(rootUri);
if (!launch) {
if (!launch || launch.getConfigurationNames().length === 0) {
const launches = configurationManager.getLaunches();
launch = first(launches, l => !!l.getConfigurationNames().length, launches.length ? launches[0] : undefined);
launch = first(launches, l => !!l.getConfigurationNames().length, launches.length ? launches[0] : launch);
}
configurationManager.selectConfiguration(launch);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册