Skip to content

Commit

Permalink
debug: use fileDirname for the default launch configuration
Browse files Browse the repository at this point in the history
When "Start Debugging" or "Run without Debugging" runs without
an explicit launch configuration (launch.json), we need to use
the directory of the file as the program. That is consistent
with the default GoDebugConfigurationProvider provides as the
default DebugConfigurations. (${fileDirname}).

Update microsoft#1229 and microsoft#3096
  • Loading branch information
hyangah committed Apr 13, 2020
1 parent 78990dd commit 92c800a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/goDebugConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class GoDebugConfigurationProvider implements vscode.DebugConfigurationPr
type: 'go',
request: 'launch',
mode: 'auto',
program: activeEditor.document.fileName
program: path.dirname(activeEditor.document.fileName) // matches ${fileDirname}
});
}

Expand Down

0 comments on commit 92c800a

Please sign in to comment.