Skip to content

Commit

Permalink
apply sourceFileMap for gotoTargetsRequest
Browse files Browse the repository at this point in the history
after @brownts, fix #332
  • Loading branch information
GitMensch committed May 5, 2022
1 parent 4939e7f commit 3ffe002
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
## Fixed
* Fixes #346 - Case-sensitivity not respected in SSH path mapping - PR #352 (@brownts)
* Fixes #342 - Local variables not displayed more than 2 stack frames deep - PR #345 (@brownts)
* Fixes #332 - "go to cursor location" does not work with ssh sourceFileMap (after @brownts)

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

Expand Down
3 changes: 2 additions & 1 deletion src/mibase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,8 @@ export class MI2DebugSession extends DebugSession {
}

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

0 comments on commit 3ffe002

Please sign in to comment.