Fix breakpoints not triggering on Windows 10 (#55)

* fix-windows-breakpoint

* perform a case-insensitve path search for packages

* revert unnecessary changes to packages
This commit is contained in:
lbhnrg2021
2019-04-24 07:50:23 +08:00
committed by Dave Holoway
parent 45e2dc2fe1
commit 52ab704acd
2 changed files with 10 additions and 2 deletions

View File

@@ -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"

View File

@@ -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