microsoft / microsoft/vscode

"Enable in Settings" button in Agent Debug Logs searches for deprecated setting

Open
#326,584 3 comments 5 reactions 1 assignee Claimed by @roblourens View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

**Type**: Bug

**Description**

When I open Developer: Open Agent Debug Logs and click Enable in Settings button, the Settings UI opens with a search query that returns **no results** in either the User or Workspace tab.

**Root Cause**

In [`chatDebugHomeView.ts:137`](https://github.com/microsoft/vscode/blob/main/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugHomeView.ts#L137), the button uses a **hardcoded** search query:

```ts
this.preferencesService.openSettings({ jsonEditor: false, query: 'agentDebugLog' });
```

This matches the **deprecated** setting `github.copilot.chat.agentDebugLog.enabled`, which has a `deprecationMessage` in [`package.json`](https://github.com/microsoft/vscode/blob/main/extensions/copilot/package.json) and is **hidden** from the Settings UI.

The correct, non-deprecated setting is `github.copilot.chat.agentDebugLog.fileLogging.enabled`.

Compare with [`chatDebugEnablement.ts:45-58`](https://github.com/microsoft/vscode/blob/main/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEnablement.ts#L45-L58) which correctly uses the `settingId` parameter (resolving to `AGENT_DEBUG_LOG_FILE_LOGGING_ENABLED_SETTING` for local sessions).

The comment at [`chatServiceImpl.ts`](https://github.com/microsoft/vscode/blob/main/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.ts) explicitly confirms:

> // agentDebugLog.enabled is deprecated; only fileLogging.enabled is authoritative.

**Fix**

Replace the hardcoded `'agentDebugLog'` with the already-imported `AGENT_DEBUG_LOG_FILE_LOGGING_ENABLED_SETTING` constant:

```diff
this.renderDisposables.add(enableButton.onDidClick(() => {
- this.preferencesService.openSettings({ jsonEditor: false, query: 'agentDebugLog' });
+ this.preferencesService.openSettings({ jsonEditor: false, query: AGENT_DEBUG_LOG_FILE_LOGGING_ENABLED_SETTING });
}));
```

**VS Code Version**

VS Code 1.129.1 (Copilot Chat 0.57.0)

**Steps to Reproduce**

1. Run `Developer: Open Agent Debug Logs`
2. Click the **"Enable in Settings"** button
3. Settings UI opens but shows **no results**

**Workaround**

Manually add to `settings.json`:
```json
"github.copilot.chat.agentDebugLog.fileLogging.enabled": true
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.