diff --git a/CHANGELOG.md b/CHANGELOG.md index 28c5c32..0b5cc1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [2.1.0] - 2023-08-02 + +### Added + +- Added debug output for connect command. + ## [2.0.1] - 2023-08-02 ### Fixed diff --git a/src/PsSqlClient/ConnectInstanceCommand.cs b/src/PsSqlClient/ConnectInstanceCommand.cs index c48fe82..99d2853 100644 --- a/src/PsSqlClient/ConnectInstanceCommand.cs +++ b/src/PsSqlClient/ConnectInstanceCommand.cs @@ -444,10 +444,11 @@ private void InitAuthenticationClass() { if (AcquireToken.IsPresent) { - WriteVerbose("Token was acquired. Use token-based authentication."); + WriteVerbose("Token will be acquired. Use token-based authentication."); _authenticationClass = AuthenticationClass.TokenAuthentication; AccessToken = new AzureServiceTokenProvider().GetAccessTokenAsync(resource: Resource).Result; + WriteDebug($"AccessToken:${AccessToken}"); } else if (!string.IsNullOrWhiteSpace(AccessToken)) { @@ -532,6 +533,7 @@ private void OpenConnection(SqlConnection connection) var connectStopwatch = Stopwatch.StartNew(); try { + WriteDebug($"Open connection with connection string: ${ ConnectionString }"); connection.Open(); } catch (SqlException ex) diff --git a/src/PsSqlClient/PsSqlClient.psd1 b/src/PsSqlClient/PsSqlClient.psd1 index 51a297f..c0bdc54 100644 Binary files a/src/PsSqlClient/PsSqlClient.psd1 and b/src/PsSqlClient/PsSqlClient.psd1 differ