Skip to content

Commit

Permalink
Merge pull request #2048 from codefori/fix/is_managed_state
Browse files Browse the repository at this point in the history
Change where manage debug context is set
  • Loading branch information
worksofliam authored May 10, 2024
2 parents 7b8cff8 + e26555d commit c213ab3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/api/debug/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,9 @@ export async function initialize(context: ExtensionContext) {
//Enable service entry points related commands
vscode.commands.executeCommand(`setContext`, debugSEPContext, await server.isSEPSupported());

if (!isManaged()) {
const isDebugManaged = isManaged();
vscode.commands.executeCommand(`setContext`, `code-for-ibmi:debugManaged`, isDebugManaged);
if (!isDebugManaged) {
const isSecure = connection.config!.debugIsSecure;

if (validateIPv4address(connection.currentHost) && isSecure) {
Expand All @@ -379,8 +381,6 @@ export async function initialize(context: ExtensionContext) {
vscode.commands.executeCommand(`setContext`, debugContext, false);
vscode.commands.executeCommand(`setContext`, debugSEPContext, false);
});

vscode.commands.executeCommand(`setContext`, `code-for-ibmi:debugManaged`, isManaged());
}

function validateIPv4address(ipaddress: string) {
Expand Down

0 comments on commit c213ab3

Please sign in to comment.