Hi, I just tried to forward a port; and I’m getting the following:
Could it be something on my side?
Thanks!
Hi, I just tried to forward a port; and I’m getting the following:
Could it be something on my side?
Thanks!
same
same
Yes this is broken for me as well, but it works in VSCode
Still not working for me ![]()
The problem is that the exe used for tunneling does not exist for Cursor in
C:\Users\username\AppData\Local\Programs\cursor\bin
I got around this problem by copying the bin folder from VS Code to Cursor.
Be aware tho’, closing the port from Cursor does not stop the process and the forwarding stays active, you have to manually stop code-tunnel.exe eg. from task manager.
this worked for me. thank you!
getting same issue
Hey, currently the code-tunnel functionality, which powers this feature, is not available in Cursor as it is proprietary to VSCode.
I’ve added this to our internal feedback tracker to see if we can ship an alternative method to get this functionality to work in a future release.
Some suggestions in light of that: remove the button, or pop up a message to your sentiments when you press the button, add some docs around it, etc.
Being that this is a VSCode fork, I expect for this to work, so if it doesn’t, not expressing that is somewhat false advertising?
More than a year, and we have the same issue.. Can’t believe
A very easy fix that is taking years to be addressed.
For the Cursor dev team:
Replace “code” by “cursor” in this line. Done.
How after all this time this is not fixed yet
With the help of cursor agent I got the below tasks.json that you put in your .vscode folder in cursor root of your project; I don’t know why it needs this complex embedded powershelll script but it works. This one forwards port 8765 for foxglove robotics simulation visualization.
Press Ctrl+Shift+P (or Cmd+Shift+P on Mac)
Type “Tasks: Run Task”
Select “Forward WSL Port 8765 (Foxglove)”
You may need to enter your Windows admin password
Note: The task automatically bypasses PowerShell execution policy.
{
"version": "2.0.0",
"tasks": [
{
"label": "Forward WSL Port 8765 (Foxglove)",
"type": "process",
"command": "powershell.exe",
"args": [
"-ExecutionPolicy",
"Bypass",
"-NoProfile",
"-Command",
"Write-Host 'Requesting Administrator privileges...' -ForegroundColor Yellow; $scriptBlock = 'Write-Host \"Setting up WSL port forwarding for Foxglove Bridge (port 8765)...\" -ForegroundColor Cyan; $wslIP = wsl hostname -I | ForEach-Object { $_.Trim() -split \"\\s+\" | Select-Object -First 1 }; Write-Host \"WSL IP Address: $wslIP\" -ForegroundColor Green; netsh interface portproxy delete v4tov4 listenport=8765 listenaddress=0.0.0.0 2>$null; Write-Host \"Cleaned up existing port proxy rules\" -ForegroundColor Yellow; netsh interface portproxy add v4tov4 listenport=8765 listenaddress=0.0.0.0 connectport=8765 connectaddress=$wslIP; Write-Host \"Added port proxy: 0.0.0.0:8765 -> $wslIP:8765\" -ForegroundColor Green; $firewallRule = Get-NetFirewallRule -DisplayName \"WSL Foxglove Bridge 8765\" -ErrorAction SilentlyContinue; if (-not $firewallRule) { New-NetFirewallRule -DisplayName \"WSL Foxglove Bridge 8765\" -Direction Inbound -LocalPort 8765 -Protocol TCP -Action Allow | Out-Null; Write-Host \"Added Windows Firewall rule for port 8765\" -ForegroundColor Green } else { Write-Host \"Windows Firewall rule already exists\" -ForegroundColor Yellow }; Write-Host \"\"; Write-Host \"Port forwarding configured successfully!\" -ForegroundColor Green; Write-Host \"\"; Write-Host \"Connect Foxglove Studio to:\" -ForegroundColor Cyan; Write-Host \" ws://localhost:8765\" -ForegroundColor White; Write-Host \" or\" -ForegroundColor Gray; Write-Host \" ws://$wslIP:8765\" -ForegroundColor White; Write-Host \"\"; Write-Host \"Press any key to close...\"; $null = $Host.UI.RawUI.ReadKey(\"NoEcho,IncludeKeyDown\")'; $encoded = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($scriptBlock)); Start-Process powershell.exe -ArgumentList \"-ExecutionPolicy Bypass -NoProfile -EncodedCommand $encoded\" -Verb RunAs"
],
"problemMatcher": [],
"presentation": {
"reveal": "always",
"panel": "new",
"focus": false,
"echo": true,
"showReuseMessage": true,
"clear": false
},
"runOptions": {
"runOn": "default"
}
},
{
"label": "Check WSL Port Forwarding",
"type": "shell",
"command": "powershell.exe",
"args": [
"-Command",
"netsh interface portproxy show all; Write-Host ''; Test-NetConnection -ComputerName localhost -Port 8765 -InformationLevel Quiet"
],
"windows": {
"options": {
"shell": {
"executable": "powershell.exe",
"args": ["-NoProfile"]
}
}
},
"problemMatcher": [],
"presentation": {
"reveal": "always",
"panel": "new",
"focus": false
}
},
{
"label": "Remove WSL Port Forwarding",
"type": "shell",
"command": "powershell.exe",
"args": [
"-Command",
"netsh interface portproxy delete v4tov4 listenport=8765 listenaddress=0.0.0.0; Write-Host 'Port forwarding removed' -ForegroundColor Green"
],
"windows": {
"options": {
"shell": {
"executable": "powershell.exe",
"args": ["-NoProfile"]
}
}
},
"problemMatcher": [],
"presentation": {
"reveal": "always",
"panel": "new",
"focus": false
}
}
]
}
The quickest fix: rename the bin file to code-tunnel
same issue. Can’t believe this isn’t fixed. I thought this was a VS code fork!