Skip to content

Commit c9b9618

Browse files
committed
src/debugAdapter: log all the env vars passed to dlv
Updates #468 Change-Id: I55d31286ab2de0e9360aa642e0ccf2d6e15eaadb Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/251478 Trust: Hyang-Ah Hana Kim <[email protected]> Trust: Suzy Mueller <[email protected]> Run-TryBot: Hyang-Ah Hana Kim <[email protected]> TryBot-Result: kokoro <[email protected]> Reviewed-by: Suzy Mueller <[email protected]>
1 parent 4af2ecc commit c9b9618

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/debugAdapter/goDebug.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import {
3838
getCurrentGoWorkspaceFromGOPATH,
3939
getInferredGopath,
4040
} from '../utils/pathUtils';
41-
import {killProcessTree} from '../utils/processUtils';
41+
import { killProcessTree } from '../utils/processUtils';
4242

4343
const fsAccess = util.promisify(fs.access);
4444
const fsUnlink = util.promisify(fs.unlink);
@@ -473,7 +473,11 @@ export class Delve {
473473
log(`Using GOPATH: ${env['GOPATH']}`);
474474
log(`Using GOROOT: ${this.goroot}`);
475475
log(`Using PATH: ${env['PATH']}`);
476-
476+
if (launchArgs.trace === 'verbose') {
477+
Object.keys(env).forEach((key) => {
478+
log(' export ' + key + '="' + env[key] + '"');
479+
});
480+
}
477481
if (!!launchArgs.noDebug) {
478482
if (mode === 'debug') {
479483
this.noDebug = true;
@@ -529,8 +533,7 @@ export class Delve {
529533

530534
if (!existsSync(launchArgs.dlvToolPath)) {
531535
log(
532-
`Couldn't find dlv at the Go tools path, ${process.env['GOPATH']}${
533-
env['GOPATH'] ? ', ' + env['GOPATH'] : ''
536+
`Couldn't find dlv at the Go tools path, ${process.env['GOPATH']}${env['GOPATH'] ? ', ' + env['GOPATH'] : ''
534537
} or ${envPath}`
535538
);
536539
return reject(

0 commit comments

Comments
 (0)