Skip to content

Commit 3ffe002

Browse files
committed
apply sourceFileMap for gotoTargetsRequest
after @brownts, fix #332
1 parent 4939e7f commit 3ffe002

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
## Fixed
33
* Fixes #346 - Case-sensitivity not respected in SSH path mapping - PR #352 (@brownts)
44
* Fixes #342 - Local variables not displayed more than 2 stack frames deep - PR #345 (@brownts)
5+
* Fixes #332 - "go to cursor location" does not work with ssh sourceFileMap (after @brownts)
56

67
[Unreleased]: https://github.com/WebFreak001/code-debug/compare/v0.26.0...HEAD
78

src/mibase.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,8 @@ export class MI2DebugSession extends DebugSession {
708708
}
709709

710710
protected gotoTargetsRequest(response: DebugProtocol.GotoTargetsResponse, args: DebugProtocol.GotoTargetsArguments): void {
711-
this.miDebugger.goto(args.source.path, args.line).then(done => {
711+
const path: string = this.isSSH ? this.sourceFileMap.toRemotePath(args.source.path) : args.source.path;
712+
+ this.miDebugger.goto(path, args.line).then(done => {
712713
response.body = {
713714
targets: [{
714715
id: 1,

0 commit comments

Comments
 (0)