0

I am working on a confidential project, so I ensure that only specific parts of the code are sent to Copilot Chat. To achieve this, I have disabled Copilot Completion and primarily use Copilot Chat. At the file level, I have disabled it entirely and only enable it for the specific range of code I select when necessary. In some cases, I include entire files, but only if I am certain they contain no confidential data. Otherwise, I use the traditional method of copying the code and pasting it into the chat.

The method I used to inspect network requests was to press Ctrl+Shift+P, type Developer: Toggle Developer Tools, and press Enter. A new window, similar to the Chromium browser, then opened. I inspected the network requests in the Network tab, started the Copilot conversation, and checked the Network DevTools again. However, no network requests related to GitHub or Copilot appeared.

Another method I tried was opening Copilot Chat in a new window. Then, I pressed Ctrl+Shift+P, typed Developer: Open Webview Developer Tools, and pressed Enter. However, no new window appeared.

1
  • Maybe copilot is using sockets (1 persistent connection)? Commented Nov 29, 2024 at 12:03

1 Answer 1

1

It's true that VSCode Developer Tool cannot inspect extension network because it's running under separate process called the Extension Host. You can take a look here but it seems complicated to setup https://stackoverflow.com/a/67099176/3789481

A simpler approach is to use Fiddler Classic as a forward proxy. By doing this, all API requests from VSCode will go through Fiddler, allowing you to inspect them, including HTTPS requests through TLS Inspection.

Fiddler setup:

enter image description here

VSCode setup: enter image description here

After that, you can inspect for any *.githubcopilot.com directly, e.g. inline suggestion

enter image description here

VSCode will send prompt and get response back as Content-Type: text/event-stream enter image description here

You can also inspect GHCP Chat with that same endpoint

Sign up to request clarification or add additional context in comments.

1 Comment

To view HTTPS traffic, I need to enable HTTPS decryption in Tools > Options > HTTPS. A popup will prompt me to install the root certificate, which I must complete to analyze HTTPS traffic successfully.

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.