Skip to content

Commit e92ab67

Browse files
committed
[release] src/goDebugConfiguration: pick fix for #1729
During release, part of the fix was dropped. Restored the fix by copying the snapshot of the repo at master before release (171cc61) and pick cfee3e1 the main fix intended for v0.28.1. Updates #1729 Change-Id: I54728fa5d11903967a62004bddd6016b43a56dae Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/352056 Trust: Hyang-Ah Hana Kim <[email protected]> Run-TryBot: Hyang-Ah Hana Kim <[email protected]> TryBot-Result: kokoro <[email protected]> Reviewed-by: Suzy Mueller <[email protected]> Reviewed-by: Rebecca Stambler <[email protected]>
1 parent 665e267 commit e92ab67

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ A list of all issues and changes can be found in the [v0.28.1 milestone](https:/
44

55
### Fixes
66
- Skipped launch configuration adjustment to address build errors when debugging using externally launched delve DAP servers. (Issue [1793](https://github.com/golang/vscode-go/issues/1793))
7+
- Restore the fix for Issue [1729](https://github.com/golang/vscode-go/issues/1729) that was accidentally dropped during merge for release.
78

89
## v0.28.0 - 20 Sep, 2021
910

src/goDebugConfiguration.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,6 @@ export class GoDebugConfigurationProvider implements vscode.DebugConfigurationPr
158158
// for local mode, default to dlv-dap.
159159
debugConfiguration['debugAdapter'] = debugConfiguration['mode'] !== 'remote' ? 'dlv-dap' : 'legacy';
160160
}
161-
if (debugConfiguration['debugAdapter'] === 'dlv-dap' && debugConfiguration['port']) {
162-
this.showWarning(
163-
'ignorePortInDlvDapWarning',
164-
"`port` is ignored with the 'dlv-dap' debugAdapter, which does not yet support remote debugging. Please file an issue if you have a use case that requires port."
165-
);
166-
}
167161
if (debugConfiguration['debugAdapter'] === 'dlv-dap' && debugConfiguration['mode'] === 'remote') {
168162
this.showWarning(
169163
'ignoreDlvDAPInRemoteModeWarning',

src/goDebugFactory.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ export class GoDebugAdapterDescriptorFactory implements vscode.DebugAdapterDescr
3838
private async createDebugAdapterDescriptorDlvDap(
3939
configuration: vscode.DebugConfiguration
4040
): Promise<vscode.ProviderResult<vscode.DebugAdapterDescriptor>> {
41+
if (configuration.port) {
42+
return new vscode.DebugAdapterServer(configuration.port, configuration.host ?? '127.0.0.1');
43+
}
4144
const logger = new TimestampedLogger(configuration.trace, this.outputChannel);
4245
logger.debug(`Config: ${JSON.stringify(configuration)}`);
4346
const d = new DelveDAPOutputAdapter(configuration, logger);

src/goInstallTools.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import {
2929
Tool,
3030
ToolAtVersion
3131
} from './goTools';
32-
import { getFromWorkspaceState } from './stateUtils';
3332
import {
3433
getBinPath,
3534
getBinPathWithExplanation,

0 commit comments

Comments
 (0)