Skip to content

Urgent: "localhost refused to connect" error message #294667

@Sa-Hu

Description

@Sa-Hu

Type: Performance Issue

When I start debugging my html programs, I receive a "This site can't be reached, localhost refused to connect. ERR_CONNECTION_REFUSED" error message. This same program I was running just fine for about 2 weeks (since I created it). I'm not sure how to resolve it and how the issue arose.

VS Code version: Code 1.109.2 (591199d, 2026-02-10T20:18:23.520Z)
OS version: Windows_NT x64 10.0.26200
Modes:

System Info
Item Value
CPUs 12th Gen Intel(R) Core(TM) i7-12700H (20 x 2688)
GPU Status 2d_canvas: enabled
GPU0: VENDOR= 0x8086, DEVICE=0x46a6 [Intel(R) Iris(R) Xe Graphics], DRIVER_VENDOR=Intel, DRIVER_VERSION=31.0.101.3962 ACTIVE
GPU1: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.7309
Machine model name:
Machine model version:
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 15.70GB (4.86GB free)
Process Argv --crash-reporter-id 71fa8ac7-06aa-4770-a8f0-cd76384a501f
Screen Reader no
VM 0%
Process Info
CPU %	Mem MB	   PID	Process
    0	   187	 13984	code
    0	    49	  2204	   utility-network-service
    0	   305	  2688	window [1] (html_explanation.html - About HTML - Visual Studio Code)
    0	   125	  4460	pty-host
    0	    75	 12788	     C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -command "try { . \"c:\Users\safah\Desktop\Microsoft VS Code\591199df40\resources\app\out\vs\workbench\contrib\terminal\common\scripts\shellIntegration.ps1\" } catch {}"
    0	     9	 19572	     conpty-agent
    0	    32	 11104	   crashpad-handler
    0	   143	 12816	shared-process
    0	   122	 25356	     "C:\Users\safah\Desktop\Microsoft VS Code\Code.exe" "c:\Users\safah\Desktop\Microsoft VS Code\591199df40\resources\app\out\bootstrap-fork" ms-vscode.pwa-chrome "{\"common.vscodemachineid\":\"ff6d280e1493e849546e45951c61cd76bd8dd6e0f66e710a19cf67dad26c01d9\",\"common.vscodesessionid\":\"2d11795e-a180-4299-8387-a1ac218eadd71770838113599\"}" 0c6ae279ed8443289764825290e4f9e2-1a736e7c-1324-4338-be46-fc2a58ae4d14-7255
    0	   279	 14556	   gpu-process
    0	   165	 18072	extension-host [1]
    0	   111	  6220	     "C:\Users\safah\Desktop\Microsoft VS Code\Code.exe" "c:\Users\safah\Desktop\Microsoft VS Code\591199df40\resources\app\extensions\json-language-features\server\dist\node\jsonServerMain" --node-ipc --clientProcessId=18072
    0	   128	 13652	     "C:\Users\safah\Desktop\Microsoft VS Code\Code.exe" "c:\Users\safah\Desktop\Microsoft VS Code\591199df40\resources\app\extensions\html-language-features\server\dist\node\htmlServerMain" --node-ipc --clientProcessId=18072
    0	   111	 25512	file-watcher [1]
Workspace Info
|  Window (html_explanation.html - About HTML - Visual Studio Code)
|    Folder (About HTML): 11 files
|      File types: html(4) dwt(2) json(1) zip(1) css(1)
|      Conf files: launch.json(1)
|      Launch Configs: chrome;
Extensions (9)
Extension Author (truncated) Version
java red 1.52.0
intellicode-api-usage-examples Vis 0.2.8
vscodeintellicode Vis 1.3.1
vscode-gradle vsc 3.17.2
vscode-java-debug vsc 0.58.5
vscode-java-dependency vsc 0.27.0
vscode-java-pack vsc 0.30.5
vscode-java-test vsc 0.44.0
vscode-maven vsc 0.45.1
A/B Experiments
vsliv368:30146709
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31436602
aj953862:31281341
82j33506:31327384
6abeh943:31336334
cloudbuttont:31379625
aihoversummaries_t:31453032
3efgi100_wstrepl:31403338
use-responses-api:31390855
ec5jj548:31422691
cp_cls_t_966_ss:31454198
c0683394:31458171
a5gib710:31434435
7a04d226_do_not_restore_last_panel_session:31438103
anthropic_thinking_c:31457102
h0hdh950:31428394
cp_cls_c_1081:31454833
nes-set-to-on:31441941
a43f0574:31442827
e9c30283:31461165
edit_mode_visible:31459180
864ei723_large_tool_results_to_disk:31460878
chat:31457767

Metadata

Metadata

Labels

*out-of-scopePosted issue is not in scope of VS CodestaleIssues that have not been triaged in an appropriate amount of timetriage-needed

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions