I generate my javascript extension project with this guide: yocode.
After installation, I press F5 to open Extension Development Host, and it turns out Extension host did not start in 10 seconds, it might be stopped on the first line and needs a debugger to continue..
Of course the Hello World command can't work.
I've also tried Node.js 7.5.0/4.2.2, and all with no luck.
I also frequently get the same error. Using hello world I can get this problem half the time. it will also happen with other extensions. I'm commenting as I have a different set up:
vsc : 1.9 the latest stable version
OS Windows 7 professional
Node 6.9.4
Can you submit your debug console output when setting "trace": "verbose" in the lunch configuration?
Also, are you behind a proxy?
I also came across this issue.
Steps to Reproduce:
I also see this issue occasionally. I think it sometimes happens after updating vscode. And just as @Izhaki suggested, restarting my VPN resolves the issue.
Most recently, I had this issue with 1.22.0-insider (9160e85b1ab0333dfe697032f90da494f1f81fd4).
Considering how unintuitive the solution is, it would be nice if vscode could give a better tip than "needs a debugger to continue." Or fix the problem.
I'm hitting this now too as of Friday. On the Microsoft internal network... It didn't seem to require updating VS Code at all. Both my Insiders and non-Insiders installations hit this when I came back from being sick for a week and I hadn't updated either of them yet. I tried uninstalling and nuking AppData state, but that didn't fix it.
I took a performance trace and it shows 50 seconds of idle activity before the extension can be debugged. The debugger toolbar disappears during that 50 seconds making you think that debugging was stopped, but it eventually comes back on its own and allows you to debug the extension host if you wait long enough. It's still an inordinate amount of time to have to wait, especially if you're trying to iterate quickly and you're used to kicking off a debugging session in 5 seconds or so.
Perf trace:
slow-debugging.zip
I can not get out of this issue by reinstall vscode/node/npm/node_modules, using the latest vscode 1.21.1 and insider version, I cannot debug any extension(I am using the most simple one helloworld), the attach seems very slow, and no error logs are found:

I'm also getting this error when using a network proxy. Disconnecting from the Internet seems to fix the issue, but that's not much of a solution.
also met at 1.22.2.
Another observation (macOS high sierra):
me too
code version 1.23.1 with ubuntu 16.04 lts
I'm experiencing the same issue.
Discovering targets via http://127.0.0.1:20421/json/list
Discovering targets via http://127.0.0.1:20421/json/list
To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"ClientRequest/attach","data":{"Versions.DebugAdapterCore":"4.2.2","Versions.DebugAdapter":"1.23.5","successful":"false","exceptionType":"firstChance","exceptionMessage":"Cannot connect to runtime process, timeout after {_timeout} ms - (reason: {_error}).","exceptionName":"Error","exceptionStack":"Error: Cannot connect to runtime process, timeout after {_timeout} ms - (reason: {_error}).\n at Object.runtimeConnectionTimeout (errors.js:91:12)\n at utils.retryAsync.catch.err (chromeConnection.js:100:49)\n at <anonymous>\n at process._tickCallback (internal/process/next_tick.js:109:7)","exceptionId":"2010","timeTakenInMilliseconds":"10010.487597","requestType":"request"}}}
VSC version: 1.23.1
OS: Windows 7
P.S. i'm not behined a proxy-server, nor i'm doing something complicated. It's just a simple Hello World extension which was generated by Yo.
I have also have the same issue, unfortunately playing with proxy options did not change a thing, default is no proxy. Here is my trace debug output:
Verbose logs are written to:
C:\Users\Bence\AppData\Local\Temp\vscode-node-debug2.txt
OS: win32 ia32
Adapter node: v7.9.0 ia32
vscode-chrome-debug-core: 6.3.1-patch.0
22:26:16, 2018-7-14
node-debug2: 1.25.6
From client: initialize({"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"extensionHost","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en-us"})
To client: {"seq":0,"type":"response","request_seq":1,"command":"initialize","success":true,"body":{"exceptionBreakpointFilters":[{"label":"All Exceptions","filter":"all","default":false},{"label":"Uncaught Exceptions","filter":"uncaught","default":false},{"label":"Promise Rejects","filter":"promise_reject","default":false}],"supportsConfigurationDoneRequest":true,"supportsSetVariable":true,"supportsConditionalBreakpoints":true,"supportsCompletionsRequest":true,"supportsHitConditionalBreakpoints":true,"supportsRestartFrame":true,"supportsExceptionInfoRequest":true,"supportsDelayedStackTraceLoading":true,"supportsValueFormattingOptions":true,"supportsEvaluateForHovers":true,"supportsLogPoints":true}}
To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"ClientRequest/initialize","data":{"Versions.DebugAdapterCore":"6.3.1-patch.0","Versions.DebugAdapter":"1.25.6","successful":"true","timeTakenInMilliseconds":"5.263135","requestType":"request"}}}
From client: launch({"name":"Extension","type":"extensionHost","request":"launch","runtimeExecutable":"C:\\Program Files\\Microsoft_VS_Code\\Code.exe","trace":"verbose","args":["--extensionDevelopmentPath=C:\\Users\\Bence\\stm32-swd"],"__sessionId":"4864997d-1743-458b-9e38-3988163eca06"})
To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"debugStarted","data":{"Versions.DebugAdapterCore":"6.3.1-patch.0","Versions.DebugAdapter":"1.25.6","request":"launch","args":["name","type","request","runtimeExecutable","trace","args","__sessionId","sourceMapPathOverrides","showAsyncStacks","sourceMaps"]}}}
C:\Program Files\Microsoft_VS_Code\Code.exe --debugBrkPluginHost=20802 --debugId=4864997d-1743-458b-9e38-3988163eca06 --extensionDevelopmentPath=C:\Users\Bence\stm32-swd
To client: {"seq":0,"type":"response","request_seq":2,"command":"launch","success":true}
To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"ClientRequest/launch","data":{"Versions.DebugAdapterCore":"6.3.1-patch.0","Versions.DebugAdapter":"1.25.6","successful":"true","timeTakenInMilliseconds":"17.795206","requestType":"request"}}}
Target exited
Target closed
Verbose logs are written to:
C:\Users\Bence\AppData\Local\Temp\vscode-node-debug2.txt
OS: win32 ia32
Adapter node: v7.9.0 ia32
vscode-chrome-debug-core: 6.3.1-patch.0
22:26:21, 2018-7-14
node-debug2: 1.25.6
From client: initialize({"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"extensionHost","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en-us"})
To client: {"seq":0,"type":"response","request_seq":1,"command":"initialize","success":true,"body":{"exceptionBreakpointFilters":[{"label":"All Exceptions","filter":"all","default":false},{"label":"Uncaught Exceptions","filter":"uncaught","default":false},{"label":"Promise Rejects","filter":"promise_reject","default":false}],"supportsConfigurationDoneRequest":true,"supportsSetVariable":true,"supportsConditionalBreakpoints":true,"supportsCompletionsRequest":true,"supportsHitConditionalBreakpoints":true,"supportsRestartFrame":true,"supportsExceptionInfoRequest":true,"supportsDelayedStackTraceLoading":true,"supportsValueFormattingOptions":true,"supportsEvaluateForHovers":true,"supportsLogPoints":true}}
To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"ClientRequest/initialize","data":{"Versions.DebugAdapterCore":"6.3.1-patch.0","Versions.DebugAdapter":"1.25.6","successful":"true","timeTakenInMilliseconds":"4.920286","requestType":"request"}}}
From client: attach({"name":"Extension","type":"extensionHost","request":"attach","runtimeExecutable":"C:\\Program Files\\Microsoft_VS_Code\\Code.exe","trace":"verbose","args":["--extensionDevelopmentPath=C:\\Users\\Bence\\stm32-swd"],"__sessionId":"4864997d-1743-458b-9e38-3988163eca06","port":20802})
To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"debugStarted","data":{"Versions.DebugAdapterCore":"6.3.1-patch.0","Versions.DebugAdapter":"1.25.6","request":"attach","args":["name","type","request","runtimeExecutable","trace","args","__sessionId","port","sourceMapPathOverrides","showAsyncStacks","sourceMaps"]}}}
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
Discovering targets via http://127.0.0.1:20802/json/list
To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"ClientRequest/attach","data":{"Versions.DebugAdapterCore":"6.3.1-patch.0","Versions.DebugAdapter":"1.25.6","successful":"false","exceptionType":"firstChance","exceptionMessage":"Cannot connect to runtime process, timeout after {_timeout} ms - (reason: {_error}).","exceptionName":"Error","exceptionStack":"Error: Cannot connect to runtime process, timeout after {_timeout} ms - (reason: {_error}).\n at Object.runtimeConnectionTimeout (errors.js:91:12)\n at utils.retryAsync.catch.err (chromeConnection.js:100:49)\n at <anonymous>\n at process._tickCallback (internal/process/next_tick.js:109:7)","exceptionId":"2010","timeTakenInMilliseconds":"9929.036762","requestType":"request"}}}
To client: {"seq":0,"type":"response","request_seq":2,"command":"attach","success":false,"message":"Cannot connect to runtime process, timeout after 10000 ms - (reason: Response from the target seems invalid. Error: Unexpected token \u0019 in JSON at position 322. Response: [ {\n \"description\": \"node.js instance\",\n \"devtoolsFrontendUrl\": \"chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:20802/f503db3d-11fe-4637-931e-fb8e180bf18d\",\n \"faviconUrl\": \"https://nodejs.org/static/favicon.ico\",\n \"id\": \"f503db3d-11fe-4637-931e-fb8e180bf18d\",\n \"title\": \"锟絓u0019锟絭(\u0004\",\n \"type\": \"node\",\n \"url\": \"file://\",\n \"webSocketDebuggerUrl\": \"ws://127.0.0.1:20802/f503db3d-11fe-4637-931e-fb8e180bf18d\"\n} ]\n\n).","body":{"error":{"id":2010,"format":"Cannot connect to runtime process, timeout after {_timeout} ms - (reason: {_error}).","variables":{"_error":"Response from the target seems invalid. Error: Unexpected token \u0019 in JSON at position 322. Response: [ {\n \"description\": \"node.js instance\",\n \"devtoolsFrontendUrl\": \"chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:20802/f503db3d-11fe-4637-931e-fb8e180bf18d\",\n \"faviconUrl\": \"https://nodejs.org/static/favicon.ico\",\n \"id\": \"f503db3d-11fe-4637-931e-fb8e180bf18d\",\n \"title\": \"锟絓u0019锟絭(\u0004\",\n \"type\": \"node\",\n \"url\": \"file://\",\n \"webSocketDebuggerUrl\": \"ws://127.0.0.[...]
VSC: 1.25.1
OS: Windows 7 Professional N
The same problem.
I debug and find this error:


Cannot find module '/Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/spdlog/build/spdlog.node'
I'm experiencing the same issue.
I press F5 to run the Extension and I get Extension host did not start in 10 seconds, it might be stopped on the first line and needs a debugger to continue error
VSC version: 1.26.1
OS: Windows 7 Enterprise
I cannot reproduce this problem with VS Code 1.27.2 or 1.28 on Windows 7.
I have the same issue on v1.28.2. and I found one interesting behavior.
ignore
TCP 127.0.0.1:54028 0.0.0.0:0 LISTENING
TCP 127.0.0.1:57467 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57468 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57470 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57471 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57473 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57474 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57475 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57476 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57477 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57478 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57479 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57480 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57483 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57484 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57486 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57487 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57488 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57489 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57490 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57491 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57493 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57494 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57497 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57498 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57499 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57500 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57501 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57502 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57503 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57504 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57505 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57506 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57509 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57510 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57511 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57512 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57514 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57515 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57516 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57517 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57518 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57519 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57522 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57523 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57524 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57525 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57526 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57527 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57528 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57529 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57531 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57532 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57536 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57537 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57539 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57540 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57541 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57542 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57543 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57544 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57545 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57546 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57549 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57550 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57551 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57552 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57553 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57554 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57555 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57556 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57557 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57558 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57561 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57562 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57563 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57564 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57565 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57566 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57567 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57568 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57570 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57571 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57573 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57574 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57575 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57576 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57577 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57578 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57579 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57580 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57582 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57583 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57585 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57586 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57587 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57588 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57589 127.0.0.1:54028 TIME_WAIT
TCP 127.0.0.1:57590 127.0.0.1:54028 TIME_WAIT
For my case, my vscode works now, vscode version is 1.29.0. In fact, it works in previous versions.
My suggestions are:
I'm going to close this issue, may the suggestions help you.
I still hit this on the newest version of vscode. And my debug console log Paused on entry, too.
I use a proxy but I don't know what exactly is this happened. What should I do to avoid this error, or I can not debug any extension at all.
I'll lock this issue now.
Please create new issues for anything that appears to be similar to this one.
Most helpful comment