locked
How to debug Core Tools with VS Code debugger? RRS feed

  • Question

  • Hi. I'm locally developing a Node.js app with  Azure Functions Core Tools. I would like to debug it with help of VS Code debugger, but I get this error: 

        Cannot connect to runtime process, timeout after 10000 ms - (reason: 
        Cannot connect to the target: connect ECONNREFUSED 127.0.0.1:5858)


    For debug option, I've chosen "Attach to JavaScript Functions". This option was there by default and I haven't created it. 

    Here is content of my launch.json:


        {
          "version": "0.2.0",
          "configurations": [
        {
          "name": "Attach to JavaScript Functions",
          "type": "node",
          "request": "attach",
          "port": 5858,
          "preLaunchTask": "runFunctionsHost"
        }
        ]} 

    How can I fix this issue and make the debugging to work?
    Tuesday, January 8, 2019 9:25 AM

Answers

  • Glad that its resolved!

    Assuming your problem had nothing to do with

    1. NodeJS Installation
    2. Default Integrated Terminal (and its environment) you are using in VS Code

    It could have just been a simple timeout issue too. If the functions host is not ready for the debugger to connect 10 secs (default), vscode gives up. In case you have the same issue again, you may want to just increase the timeout in .vscode/launch.json

    image

    Wednesday, January 9, 2019 1:40 PM

All replies

  • Could you share the log that you see in the Integrated Terminal?
    Tuesday, January 8, 2019 2:03 PM
  • Thank you. Surprisingly issue was resolved by itself. I will keep you posted if problem persisted again.
    Tuesday, January 8, 2019 4:16 PM
  • Glad that its resolved!

    Assuming your problem had nothing to do with

    1. NodeJS Installation
    2. Default Integrated Terminal (and its environment) you are using in VS Code

    It could have just been a simple timeout issue too. If the functions host is not ready for the debugger to connect 10 secs (default), vscode gives up. In case you have the same issue again, you may want to just increase the timeout in .vscode/launch.json

    image

    Wednesday, January 9, 2019 1:40 PM