The VS Code extension runtime uses Node.js (via Electron) and you can thus use Node.js related debugging tool.
Here's a quick guide on how to record performances traces of VS Code extensions:
-
You have to start VS Code with a special runtime flag. In macOS, you can do so via the terminal like this:
/Applications/Visual\ Studio\ Code.app/Contents/MacOS/Electron --inspect-extensions=9333