Skip to content

[lldb-dap] fix config value comparison #142017

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 29, 2025

Conversation

eronnen
Copy link
Contributor

@eronnen eronnen commented May 29, 2025

Fix TypeSCript comparison (when defining an empty config string like commandEscapePrefix="" it would skip it)

@eronnen eronnen requested a review from ashgti May 29, 2025 19:27
@eronnen eronnen requested a review from JDevlieghere as a code owner May 29, 2025 19:27
@eronnen eronnen removed the request for review from JDevlieghere May 29, 2025 19:27
@llvmbot
Copy link
Member

llvmbot commented May 29, 2025

@llvm/pr-subscribers-lldb

Author: Ely Ronnen (eronnen)

Changes

Fix TypeSCript comparison (when defining an empty config string like commandEscapePrefix="" it would skip it)


Full diff: https://github.com/llvm/llvm-project/pull/142017.diff

1 Files Affected:

  • (modified) lldb/tools/lldb-dap/src-ts/debug-configuration-provider.ts (+1-1)
diff --git a/lldb/tools/lldb-dap/src-ts/debug-configuration-provider.ts b/lldb/tools/lldb-dap/src-ts/debug-configuration-provider.ts
index 957bc5e1eb956..316ffaf47c3d2 100644
--- a/lldb/tools/lldb-dap/src-ts/debug-configuration-provider.ts
+++ b/lldb/tools/lldb-dap/src-ts/debug-configuration-provider.ts
@@ -84,7 +84,7 @@ export class LLDBDapConfigurationProvider
         continue;
       }
       const value = config.get(key);
-      if (!value || value === cfg.default) {
+      if (value === undefined || value === cfg.default) {
         continue;
       }
       switch (cfg.type) {

@eronnen eronnen requested a review from JDevlieghere May 29, 2025 19:28
@eronnen eronnen merged commit cde67b6 into llvm:main May 29, 2025
11 of 12 checks passed
google-yfyang pushed a commit to google-yfyang/llvm-project that referenced this pull request May 29, 2025
Fix TypeSCript comparison (when defining an empty config string like
`commandEscapePrefix=""` it would skip it)
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Jun 3, 2025
Fix TypeSCript comparison (when defining an empty config string like
`commandEscapePrefix=""` it would skip it)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants