Skip to content

Profiling Remote Processes

Rob Lourens edited this page Dec 30, 2023 · 1 revision

If you want to profile VS Code's local processes, see the Performance Issues wiki page for multiple options.

Here is an easy method to profile node processes running on a remote machine. Please note that these profiles will contain absolute paths to the running VS Code Server and extension files.

Note: At the moment, this can only be used to debug the VS Code Server process, not the remote extension host process. https://github.com/microsoft/vscode-js-debug/issues/1914

  • Open a folder on the remote, and if a .vscode/launch.json file doesn't already exist, use the debug view to create one.
  • Add a debug configuration like this
{
    "name": "Attach by Process ID",
    "processId": "${command:PickProcess}",
    "request": "attach",
    "skipFiles": [
        "<node_internals>/**"
    ],
    "type": "node"
}
  • Run this configuration, and select the PID of the process you would like to debug.
  • Follow the steps described in the Performance Profiling JavaScript documentation to collect a profile.
  • Share this profile when filing an issue.