From 52ab704acdbc7b52e4bc80113652943298dd6e57 Mon Sep 17 00:00:00 2001 From: lbhnrg2021 Date: Wed, 24 Apr 2019 07:50:23 +0800 Subject: [PATCH] Fix breakpoints not triggering on Windows 10 (#55) * fix-windows-breakpoint * perform a case-insensitve path search for packages * revert unnecessary changes to packages --- package.json | 4 ++-- src/debugMain.js | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6bd74fa..99aba95 100644 --- a/package.json +++ b/package.json @@ -135,10 +135,10 @@ "test": "node ./node_modules/vscode/bin/test" }, "dependencies": { - "vscode-debugprotocol": "^1.32.0", - "vscode-debugadapter": "^1.32.0", "long": "^4.0.0", "uuid": "^3.3.2", + "vscode-debugadapter": "^1.32.0", + "vscode-debugprotocol": "^1.32.0", "ws": "^1.1.1", "xmldom": "^0.1.27", "xpath": "^0.0.27" diff --git a/src/debugMain.js b/src/debugMain.js index 94d04e8..97c543a 100644 --- a/src/debugMain.js +++ b/src/debugMain.js @@ -614,6 +614,14 @@ class AndroidDebugSession extends DebugSession { if ((pkginfo = this.src_packages.packages[pkg]).package_path === srcfolder) break; pkginfo = null; } + // if we didn't find an exact path match, look for a case-insensitive match + if (!pkginfo) { + for (var pkg in this.src_packages.packages) { + if ((pkginfo = this.src_packages.packages[pkg]).package_path.localeCompare(srcfolder, undefined, { sensitivity: 'base' }) === 0) break; + pkginfo = null; + } + } + // if it's not in our source packages, check if it's in the Android source file cache if (!pkginfo && is_subpath_of(srcfpn, this._android_sources_path)) { // create a fake pkginfo to use to construct the bp