Skip to content

Commit 42b6c74

Browse files
authored
fix: edge devtools incorrectly ask for local forwarding (#1809)
Fixes microsoft/vscode#193110
1 parent 76ec0a3 commit 42b6c74

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ This changelog records changes to stable releases since 1.50.2. "TBA" changes he
55
## Nightly (only)
66

77
- feat: show class names of methods in call stack view ([#1770](https://github.com/microsoft/vscode-js-debug/issues/1770))
8+
- fix: edge devtools incorrectly ask for local forwarding ([vscode#193110](https://github.com/microsoft/vscode/issues/193110))
89

910
## v1.82 (August 2023)
1011

src/ui/requestCDPProxy.ts

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,23 @@ export const registerRequestCDPProxy = (
2828
}
2929

3030
try {
31-
const tunneled = await tunnels.request(sessionId, {
32-
label: 'Edge Devtools Tunnel',
33-
remotePort: proxied.port,
34-
});
31+
if (vscode.env.remoteName !== undefined) {
32+
const tunneled = await tunnels.request(sessionId, {
33+
label: 'Edge Devtools Tunnel',
34+
remotePort: proxied.port,
35+
});
3536

36-
return {
37-
host: tunneled.localAddress.host,
38-
port: tunneled.localAddress.port,
39-
path: proxied.path,
40-
};
37+
return {
38+
host: tunneled.localAddress.host,
39+
port: tunneled.localAddress.port,
40+
path: proxied.path,
41+
};
42+
}
4143
} catch {
42-
return proxied;
44+
// fall through
4345
}
46+
47+
return proxied;
4448
}),
4549
);
4650
};

0 commit comments

Comments
 (0)