-2

I have a large code base of Azure Functions (Typescript) that I manage using VS Code and the Azure Functions extension. I am using VS Code in WSL (Windows). I've been able to debug these functions in VS Code for a few years with no problems. However, I've started to notice odd behavior:

  1. VS Code started not picking up code changes after stopping and restarting the debugger. I would have to manually run npm run build.
  2. Hitting the "Stop" debugging button would not kill the process, and the function would keep running.
  3. Now when I start debugging, I don't see the debugging toolbar (with stop, stepover, etc.). When I try to "dock" it using VS Code settings, it appears for a bit, then disappears. Breakpoints are no longer hit.

The above issues started after a few recent updates of VS Code. I'm at the point where I can't debug anything. Here are some things I've tried:

  1. Checking launch.json and tasks.json to ensure everything is set up correctly. See below for current versions.
  2. Used Copilot to generate a new launch.json (just created other issues).
  3. Updating Azure Functions Core Tools and the Azure Functions extension.
  4. Clearing all cache folders and restarting VS Code.
  5. Re-installing VS Code.

launch.json:

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Attach to Node Functions",
      "type": "node",
      "request": "attach",
      "port": 9229,
      "preLaunchTask": "func: host start"
    }
  ]
}

tasks.json:

{
  "version": "2.0.0",
  "tasks": [
    {
      "type": "func",
      "label": "func: host start",
      "command": "host start",
      "problemMatcher": "$func-node-watch",
      "isBackground": true,
      "dependsOn": "npm build (functions)"
    },
    {
      "type": "shell",
      "label": "npm build (functions)",
      "command": "npm run build",
      "dependsOn": "npm clean (functions)",
      "problemMatcher": "$tsc"
    },
    {
      "type": "shell",
      "label": "npm install (functions)",
      "command": "npm install"
    },
    {
      "type": "shell",
      "label": "npm prune (functions)",
      "command": "npm prune --production",
      "dependsOn": "npm build (functions)",
      "problemMatcher": []
    },
    {
      "type": "shell",
      "label": "npm clean (functions)",
      "command": "npm run clean",
      "dependsOn": "npm install (functions)"
    }
  ]
}
1
  • Did you create an issue in github.com/microsoft/vscode/issues? Does it work when you uninstall it and install an older version? Commented Oct 2 at 23:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.