Actual DV calls support for ServerLogic Debug using PAC auth#1375
Open
amitjoshi438 wants to merge 11 commits intomainfrom
Open
Actual DV calls support for ServerLogic Debug using PAC auth#1375amitjoshi438 wants to merge 11 commits intomainfrom
amitjoshi438 wants to merge 11 commits intomainfrom
Conversation
added 11 commits
November 10, 2025 14:45
…un/debug commands - Implement local Server Logic debugger with mock Power Pages SDK (src/debugger/server-logic/ServerLogicMockSdk.ts) - Provide debug configuration provider, runtime loader generation, commands for Debug/Run/Generate Mock Data, and welcome notification (ServerLogicDebugger.ts, sample-server-logic.js, README.md, index.ts) - Add CodeLens provider to show inline "Debug" / "Run" actions (ServerLogicCodeLensProvider.ts) and register it on activation - Wire activation into extension (activateServerLogicDebugger in extension.ts) - Add package.json contributions: debug/run commands, snippets, editor/context entries - Add telemetry events for debug/run/mock-template actions - Enable generation of .vscode/mock-data.json and support loading custom mock data
…functions, avoid loader overwrite
…; localize debug/run titles and messages
Base automatically changed from
users/amitjoshi/serverLogicDebugSupport
to
main
December 19, 2025 10:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces major improvements to the Server Logic debugging experience in Power Pages by enabling direct Dataverse API calls during debugging when authenticated, and refactoring the debugger activation for better integration with authentication. The changes ensure that, when authenticated via the PAC CLI, server logic code can call Dataverse APIs directly using real credentials; otherwise, mock responses are returned. The activation and command handling logic for the debugger has been updated to support this, along with enhanced telemetry and error handling.
Server Logic Debugger & Authentication Integration:
activateServerLogicDebuggerfunction to accept aPacWrapperparameter, enabling automatic retrieval of Dataverse credentials for real API calls during debugging. This includes new helper functions for credential retrieval and validation of server logic files. (src/debugger/server-logic/ServerLogicDebugger.ts,src/client/extension.ts) [1] [2] [3] [4]powerpages.debugServerLogiccommand from the navigation menu to prevent it from appearing in inappropriate contexts. (package.json)Dataverse API Call Support in Mock SDK:
generateServerMockSdkfunction to support direct Dataverse API calls (CRUD and custom API) using credentials injected via environment variables during debugging. If not authenticated, the SDK falls back to returning mock responses. (src/debugger/server-logic/ServerLogicMockSdk.ts) [1] [2] [3] [4] [5] [6] [7] [8]Telemetry and Error Handling:
SERVER_LOGIC_AUTH_ERRORto track authentication failures when retrieving Dataverse credentials. Telemetry for debug and run commands now includes whether real credentials were used. (src/common/OneDSLoggerTelemetry/client/desktopExtensionTelemetryEventNames.ts,src/debugger/server-logic/ServerLogicDebugger.ts) [1] [2] [3]These changes provide a more realistic and seamless debugging experience for server logic, improve error visibility, and streamline command handling for developers.