From 17b51df54c582f74fb9054e3804caff05e02e34c Mon Sep 17 00:00:00 2001 From: Taylore Thornton Date: Wed, 3 Jun 2026 08:25:31 -0400 Subject: [PATCH 1/2] allow exact match --- src/configurationProvider.ts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/configurationProvider.ts b/src/configurationProvider.ts index 92db8e11..f82ea526 100644 --- a/src/configurationProvider.ts +++ b/src/configurationProvider.ts @@ -491,11 +491,20 @@ export class JavaDebugConfigurationProvider implements vscode.DebugConfiguration for (const p of paths) { if (p.startsWith("!")) { let exclude = p.substr(1); + let isDirect: boolean; if (!path.isAbsolute(exclude)) { exclude = path.join(folder?.uri.fsPath || "", exclude); } + + if (exclude.endsWith("/")) { + exclude = exclude.substr(0, exclude.length - 1); + isDirect = true; + } else { + isDirect = this.isFilePath(exclude); + } + // use Uri to normalize the fs path - excludes.set(vscode.Uri.file(exclude).fsPath, this.isFilePath(exclude)); + excludes.set(vscode.Uri.file(exclude).fsPath, isDirect); continue; } @@ -503,12 +512,12 @@ export class JavaDebugConfigurationProvider implements vscode.DebugConfiguration } return result.filter((r) => { - for (const [excludedPath, isFile] of excludes.entries()) { - if (isFile && r === excludedPath) { + for (const [excludedPath, isDirect] of excludes.entries()) { + if (isDirect && r === excludedPath) { return false; } - if (!isFile && r.startsWith(excludedPath)) { + if (!isDirect && r.startsWith(excludedPath)) { return false; } } From 41ac4eb00fa518db65f96a9cf024c356b3513b89 Mon Sep 17 00:00:00 2001 From: Taylore Thornton Date: Wed, 3 Jun 2026 08:59:58 -0400 Subject: [PATCH 2/2] windows support --- src/configurationProvider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/configurationProvider.ts b/src/configurationProvider.ts index f82ea526..1721c5ab 100644 --- a/src/configurationProvider.ts +++ b/src/configurationProvider.ts @@ -496,7 +496,7 @@ export class JavaDebugConfigurationProvider implements vscode.DebugConfiguration exclude = path.join(folder?.uri.fsPath || "", exclude); } - if (exclude.endsWith("/")) { + if (exclude.endsWith(process.platform === 'win32' ? '\\' : '/')) { exclude = exclude.substr(0, exclude.length - 1); isDirect = true; } else {