> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/QwenLM/qwen-code/llms.txt
> Use this file to discover all available pages before exploring further.

# /bug Command

> Submit a bug report with automatic system information

## Overview

The `/bug` command opens your browser to submit a bug report with automatically collected system information. This helps the Qwen Code team diagnose and fix issues more efficiently.

## Usage

### Basic Usage

```bash theme={null}
qwen
> /bug
```

This opens the bug report form with system information pre-filled.

### With Description

```bash theme={null}
qwen
> /bug "The compress command fails with large conversations"
```

This includes your description in the bug report title.

## What It Does

When you run `/bug`, the command:

1. **Collects System Info**: Gathers diagnostic information
2. **Opens Browser**: Launches your default browser
3. **Pre-fills Form**: Populates the GitHub issue template
4. **Protects Privacy**: Only includes non-sensitive data

## Collected Information

The bug command automatically includes:

### System Information

```
Operating System: macOS 14.2.1 (arm64)
Node Version: v20.11.0
CLI Version: 1.0.0
Terminal: iTerm2
```

### Configuration

```
Model: qwen-coder-plus
Provider: dashscope
Authentication: configured
Sandbox: enabled
```

### Runtime Details

```
Session ID: a1b2c3d4-e5f6-7890
Session Duration: 1h 23m
Memory Usage: 245 MB
Node Memory Limit: 4096 MB
```

### Recent Errors (if any)

```
Last Error: Tool 'edit' failed with "File not found"
Timestamp: 2024-03-10 15:42:33
```

<Warning>
  No code, API keys, or conversation content is included in bug reports. Only system and configuration information is collected.
</Warning>

## Bug Report Process

### Step 1: Run the Command

```bash theme={null}
qwen
> /bug "Describe the issue here"
```

### Step 2: Browser Opens

Your browser opens to:

```
https://github.com/QwenLM/qwen-code/issues/new?template=bug_report.yml
```

### Step 3: Complete the Form

The form is pre-filled with:

* **Title**: Your description (if provided)
* **System Information**: Automatically collected data
* **Steps to Reproduce**: Empty for you to fill
* **Expected Behavior**: Empty for you to fill
* **Actual Behavior**: Empty for you to fill

### Step 4: Add Details

Enhance the report with:

* Detailed steps to reproduce
* Expected vs actual behavior
* Screenshots if relevant
* Error messages from terminal

### Step 5: Submit

Click **Submit new issue** to create the bug report.

## Custom Bug Report URL

Configure a custom bug reporting endpoint:

```json theme={null}
// settings.json
{
  "bugCommand": {
    "urlTemplate": "https://your-issue-tracker.com/new?title={title}&info={info}"
  }
}
```

Placeholders:

* `{title}`: Bug description from command
* `{info}`: System information

## Good Bug Reports

### Include Reproduction Steps

```bash theme={null}
> /bug "Edit command fails on Windows"
```

Then in the form:

```markdown theme={null}
## Steps to Reproduce
1. Run `qwen` on Windows 11
2. Execute command: "Edit src/index.ts to add logging"
3. Edit tool returns error: "Access denied"

## Expected Behavior
File should be edited successfully

## Actual Behavior
Error: "Access denied" even though file exists and is writable
```

### Include Error Messages

```bash theme={null}
> /bug "Crash when using compress command"
```

Include the full error:

```markdown theme={null}
## Error Message
```

Error: Failed to compress chat history
at compressCommand (/usr/local/lib/node\_modules/@qwen/cli/dist/commands/compress.js:45:11)
at async runCommand (/usr/local/lib/node\_modules/@qwen/cli/dist/cli.js:123:5)

```
```

### Include Context

```bash theme={null}
> /bug "Tool execution slow in CI environment"
```

Provide context:

```markdown theme={null}
## Context
- Running in GitHub Actions
- Using Docker container
- Network latency to API is high (500ms+)
- Same command works fine locally
```

## Common Issues to Report

### Crashes

```bash theme={null}
> /bug "CLI crashes when running /compress"
```

### Tool Failures

```bash theme={null}
> /bug "Bash tool hangs on Windows"
```

### Authentication Issues

```bash theme={null}
> /bug "OAuth authentication fails on Linux"
```

### Performance Problems

```bash theme={null}
> /bug "Response time >30s with qwen-turbo"
```

### UI Glitches

```bash theme={null}
> /bug "Terminal display corrupted after /help"
```

## Privacy and Security

### What's Included

✅ Operating system and version\
✅ Node.js version\
✅ CLI version\
✅ Configuration settings (model, provider)\
✅ Error types and stack traces\
✅ Session metadata (duration, token counts)

### What's Excluded

❌ API keys or credentials\
❌ Conversation history\
❌ File contents\
❌ Personal information\
❌ Project source code\
❌ Environment variables

### Review Before Submitting

Always review the collected information:

```bash theme={null}
> /bug "Issue description"
# Browser opens, review the pre-filled information
# Remove anything sensitive before submitting
```

## Alternative Reporting Methods

### Manual GitHub Issue

Create an issue directly:

1. Visit [GitHub Issues](https://github.com/QwenLM/qwen-code/issues)
2. Click "New Issue"
3. Select "Bug Report" template
4. Fill in all sections
5. Submit

### Discussion Forums

For questions rather than bugs:

1. Visit [GitHub Discussions](https://github.com/QwenLM/qwen-code/discussions)
2. Create a new discussion
3. Choose "Q\&A" category

### Community Support

Get help from the community:

* **Discord**: [Join the server](https://discord.gg/qwen)
* **Twitter**: [@QwenLM](https://twitter.com/QwenLM)

## Debug Mode

For more detailed bug reports, run in debug mode:

```bash theme={null}
qwen --debug
```

This provides:

* Verbose logging
* Detailed error traces
* Performance metrics
* Internal state information

Copy relevant debug output and include in your bug report.

## System Information Details

The `/bug` command collects:

### Operating System

```
OS: macOS
Version: 14.2.1
Architecture: arm64
Platform: darwin
```

### Runtime Environment

```
Node.js: 20.11.0
V8: 11.3.244.8
CLI Version: 1.0.0
Install Method: npm
```

### Terminal Information

```
Terminal: iTerm2 3.4.23
Shell: zsh 5.9
Color Support: 24-bit
TTY: true
```

### Configuration

```
Auth Type: dashscope
Model: qwen-coder-plus
Approval Mode: default
Sandbox: enabled
Extensions: 3 installed
```

## Feature Requests

For feature requests, use a different template:

```bash theme={null}
# Don't use /bug for features
# Instead, create a feature request on GitHub:
https://github.com/QwenLM/qwen-code/issues/new?template=feature_request.yml
```

## Follow-Up

After submitting:

1. **Watch the Issue**: Get notifications on updates
2. **Respond to Questions**: The team may ask for clarification
3. **Test Fixes**: Try beta versions with bug fixes
4. **Confirm Resolution**: Report if the fix works

## Troubleshooting

### Browser Doesn't Open

If the browser fails to open:

```
To submit your bug report, please open the following URL in your browser:
https://github.com/QwenLM/qwen-code/issues/new?template=bug_report.yml&title=...
```

Copy the URL and open it manually.

### Custom Browser

Set your preferred browser:

```bash theme={null}
export BROWSER=/usr/bin/firefox
qwen
> /bug
```

### WSL/Remote Systems

On WSL or remote systems:

```bash theme={null}
# The URL will be printed, copy it
> /bug "Issue description"
# Copy the URL and open on your host machine
```

## Best Practices

<AccordionGroup>
  <Accordion title="Be Specific">
    Provide clear, specific descriptions:

    ❌ Bad: `/bug "It doesn't work"`\
    ✅ Good: `/bug "Edit tool fails with 'EACCES' on Windows when editing package.json"`
  </Accordion>

  <Accordion title="Include Versions">
    The bug command includes versions automatically, but mention if you tried multiple:

    ```markdown theme={null}
    Tested with:
    - CLI v1.0.0: Fails
    - CLI v0.9.5: Works
    ```
  </Accordion>

  <Accordion title="Minimal Reproduction">
    Find the smallest example that reproduces the issue:

    ```bash theme={null}
    # Instead of "my complex workflow fails"
    # Find the minimal case:
    qwen --prompt "Edit nonexistent.txt" # Crashes
    ```
  </Accordion>

  <Accordion title="Search First">
    Before reporting, search existing issues:

    ```
    https://github.com/QwenLM/qwen-code/issues?q=is:issue+edit+tool
    ```

    Your issue might already be reported.
  </Accordion>
</AccordionGroup>

## See Also

<CardGroup cols={2}>
  <Card title="Help Command" icon="circle-question" href="/cli/help">
    Get help and documentation
  </Card>

  <Card title="Debug Mode" icon="bug-slash" href="/advanced/debugging">
    Advanced debugging techniques
  </Card>

  <Card title="Community" icon="users" href="/community">
    Get help from the community
  </Card>

  <Card title="Contributing" icon="code-pull-request" href="/contributing">
    Contribute to Qwen Code
  </Card>
</CardGroup>
