-
Notifications
You must be signed in to change notification settings - Fork 315
Update Add-Debug-Profile Script to Allow Debugging OpenAI Plugin #8763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: jorgerangel-msft <[email protected]>
Co-authored-by: jorgerangel-msft <[email protected]>
@copilot run |
Co-authored-by: jorgerangel-msft <[email protected]>
Done! Formatting applied with Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
- [Getting Started](#getting-started) | ||
- [Development Workflow](#development-workflow) | ||
- [Testing](#testing) | ||
- [Debugging](#debugging) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot don't update this file. Remove all the changes you made to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! All changes to CONTRIBUTING.md have been removed and the file has been reverted to its original state. (Commit: Revert all changes to CONTRIBUTING.md)
Co-authored-by: jorgerangel-msft <[email protected]>
[string]$SdkDirectory, | ||
|
||
[Parameter(Mandatory = $false)] | ||
[switch]$IsOpenAIPlugin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot why do we need an entire flag for this? Couldn't we simply improve the logic to check if the sdkdirectory contains the name of the repo "openai-dotnet" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestion! I've replaced the -IsOpenAIPlugin
flag with automatic detection. The script now checks if the SDK directory path contains "openai-dotnet" to determine the workflow. This simplifies usage - users just need to provide the path:
.\Add-Debug-Profile.ps1 -SdkDirectory "C:\path\to\openai-dotnet"
(Commit: Replace IsOpenAIPlugin flag with auto-detection based on path)
Co-authored-by: jorgerangel-msft <[email protected]>
Summary
Successfully extended the Add-Debug-Profile.ps1 script to support debugging the OpenAI plugin. The script now automates the entire manual process described in the issue and automatically detects whether it's working with an OpenAI plugin or Azure SDK repository.
Changes Made
Core Functionality
Build-OpenAICodegen
function that runsnpm ci
in the repo root andnpm run build
in the codegen folderCopy-LocalGeneratorDlls
to support copying DLLs to both Azure SDK (node_modules
) and OpenAI (codegen/dist/generator
) target pathsOpenAILibraryGenerator
generator name for OpenAI scenarios--debug
flag for proper debugging experienceUsage
For OpenAI Plugin (automatically detected):
For Azure SDK (existing functionality):
Manual Process Automated
The script fully automates the 4-step manual process described in the issue:
npm ci
in OpenAI repo root to install dependenciesnpm run build
in codegen folder to build the packagecodegen/dist/generator
directory--debug
flag andOpenAILibraryGenerator
Testing
Fixes #8761
Original prompt
Fixes #8761
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.