Skip to content

Commit

Permalink
src/goDebug: fix noDebug mode for windows
Browse files Browse the repository at this point in the history
On windows, the executable file has to have '.exe' extension. Add the
extension when building the program in noDebug mode.

Updates #918

Change-Id: Icddf6c2dced50f885e1dd27fc685a14ea54d52e1
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/274872
Trust: Suzy Mueller <suzmue@golang.org>
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Suzy Mueller <suzmue@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
  • Loading branch information
suzmue committed Dec 2, 2020
1 parent e8d462e commit e2d78f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/debugAdapter/goDebug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
import { DebugProtocol } from 'vscode-debugprotocol';
import { parseEnvFiles } from '../utils/envUtils';
import {
correctBinname,
envPath,
expandFilePathInOutput,
fixDriveCasingInWindows,
Expand Down Expand Up @@ -482,8 +483,7 @@ export class Delve {
if (mode === 'debug') {
this.noDebug = true;
const build = ['build'];

const output = path.join(os.tmpdir(), 'out');
const output = path.join(os.tmpdir(), correctBinname('out'));
build.push(`-o=${output}`);

const buildOptions: { [key: string]: any } = { cwd: dirname, env };
Expand Down

0 comments on commit e2d78f1

Please sign in to comment.