2

I am trying to debug my Angular application using VScode. If I start my computer up, run the application and launch my debugger straight away it works fine.

The problem begins after I have been working a while, opening programs and opening different tabs in chrome etc.

If I try to repeat the process of launching to debugger it throws an error.

enter image description here

Cannot connect to runtime process, timeout after 10000 ms - (reason: Can't find a valid target that matches: about:blank. Available pages: ["http://localhost:9877/?id%3D580327"]).

No matter if I restart VScode, close all my browsers or whatever, nothing works. I basically have to restart my computer to get it working again (not cool).

This is my 'launch.json' which I am purposefully using port 4202

    {   // For this config to work, the app must already be running on 4202
        // This simply opens the app chome with the debugger on this port
        "type": "chrome",
        "request": "launch",
        "name": "Launch Chrome against localhost",
        "url": "http://localhost:4202/",
        "webRoot": "${workspaceFolder}"
    }
Monis
  • 165
  • 2
  • 12
codeThinker123
  • 664
  • 1
  • 6
  • 16
  • Does this happen with other browsers as well? with FF/Edge or Safari ? – Monis Jun 13 '20 at 08:08
  • I just tested on Firefox and Edge and I did not get the error. It worked. But still the problem persists with chrome. Thanks for the heads up. Any Ideas why this error would be thrown when using chrome? – codeThinker123 Jun 13 '20 at 18:48

0 Answers0