Skip to content

Commit

Permalink
debugger: fixes trueCasePathSync use
Browse files Browse the repository at this point in the history
  • Loading branch information
APerricone committed Jun 25, 2020
1 parent c60acbd commit 6178dc8
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
7 changes: 4 additions & 3 deletions client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# Change Log
All notable changes to the "Harbour and xHarbour" extension will be documented in this file.

# 0.9.13
- **debugger** better stability

# 0.9.12
- **debugger** better stability
- **task** better stability
- **task** correct management of batch option

# 0.9.11
- **server** fixes case of unfound parent [#57](https://github.com/APerricone/harbourCodeExtension/issues/57)
- **syntax** fixes [memvar aliasing syntax highlighting #58](https://github.com/APerricone/harbourCodeExtension/issues/58),
[Multiline "inline" class methods syntax highlighting #59](https://github.com/APerricone/harbourCodeExtension/issues/59),
[Try catch syntax highlighting #60](https://github.com/APerricone/harbourCodeExtension/issues/60) by [Edgard Lorraine Messias](https://github.com/edgardmessias)
- **syntax** fixes [memvar aliasing syntax highlighting #58](https://github.com/APerricone/harbourCodeExtension/issues/58), [Multiline "inline" class methods syntax highlighting #59](https://github.com/APerricone/harbourCodeExtension/issues/59), [Try catch syntax highlighting #60](https://github.com/APerricone/harbourCodeExtension/issues/60) by [Edgard Lorraine Messias](https://github.com/edgardmessias)
- **debugger** better step out and step next support
- **server** better code folding see [#56](https://github.com/APerricone/harbourCodeExtension/issues/56)
- **task** added temporary variable solver waiting for [VSCode #81007](https://github.com/microsoft/vscode/issues/81007)
Expand Down
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "harbour",
"displayName": "Harbour and xHarbour",
"description": "Harbour and xHarbour languages support for visual studio code",
"version": "0.9.12",
"version": "0.9.13",
"publisher": "aperricone",
"icon": "harbourIcon.png",
"main": "./dist/extension",
Expand Down
24 changes: 16 additions & 8 deletions client/src/debugger.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,21 +385,29 @@ harbourDebugSession.prototype.sendStack = function(line) {
var completePath = infos[0]
var found = false;
if(infos[0].length>0) {
try {
if(path.isAbsolute(infos[0]) && fs.existsSync(infos[0])) {
completePath = trueCase.trueCasePathSync(infos[0]);
found=true;
try {
completePath = trueCase.trueCasePathSync(infos[0]);
found=true;
} catch(ex) {
found=false;

This comment has been minimized.

Copy link
@APerricone

APerricone Jun 25, 2020

Author Owner

better set found to true even in case of exception and set completePath as infos[0]

}
} else
for(i=0;i<this.sourcePaths.length;i++) {
if(fs.existsSync(path.join(this.sourcePaths[i],infos[0]))) {
completePath = trueCase.trueCasePathSync(infos[0],this.sourcePaths[i]);
completePath = path.join(this.sourcePaths[i],infos[0]);
try {
completePath = trueCase.trueCasePathSync(infos[0],this.sourcePaths[i]);
} catch(ex) {
try {

This comment has been minimized.

Copy link
@APerricone

APerricone Jun 25, 2020

Author Owner

added issue for this Profiscience/true-case-path#9

completePath = trueCase.trueCasePathSync(completePath);
} catch(ex2) {
}
}
found=true;
break;
}
}
} catch(ex) {
found=false;
}
}
}
if(found) infos[0]=path.basename(completePath);
frames[j] = new debugadapter.StackFrame(j,infos[2],
Expand Down

0 comments on commit 6178dc8

Please sign in to comment.