[release/7.0] Fixes not find assembly and pdb if it's not using the default path#92955
Conversation
|
Tagging subscribers to this area: @thaystg Issue DetailsFixes #93016 When a customer is setting another path for the assets during the Blazor start the debugger is not working.
|
| } | ||
| catch (Exception ex) | ||
| { | ||
| logger.LogError($"Failed to load {step.Url} ({ex.Message})"); |
There was a problem hiding this comment.
Wondering why ex is not passed as an argument to LogError? This might provide the user with more information?
| } | ||
| catch (Exception ex) | ||
| { | ||
| logger.LogError($"Failed to load {step.Url} ({ex})"); |
There was a problem hiding this comment.
I think he meant https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging.loggerextensions.logerror?view=dotnet-plat-ext-7.0#microsoft-extensions-logging-loggerextensions-logerror(microsoft-extensions-logging-ilogger-system-exception-system-string-system-object()) . Does the error show up in VS? how?
There was a problem hiding this comment.
That's what I meant. I would expect that to should up in the output of the console application that is being launched when running the debugger? Now also wondering if the e should also be passed to the logger.LogDebug method.
| if (tryUseDebuggerProtocol) | ||
| { | ||
| string unescapedFileName = Uri.UnescapeDataString(step.Url); | ||
| bytes = await context.SdbAgent.GetBytesFromAssemblyAndPdb(Path.GetFileName(unescapedFileName), token); |
|
And thanks for this quick fix thaystg. Happy that you could reproduce this error and find what was causing this so quickly. I am wondering if extra unit tests should be added for this? |
This is a scenario that has a different implementation for .net8, which doesn't matter the file url, I don't think we need unit tests for it. |
|
@thaystg has all feedback been addressed? If yes, can you please send an email to Tactics requesting approval? |
|
Approved by Tactics via email. |
Customer Impact
Fixes #93016
When a customer is setting another path for the assets during the Blazor start the debugger is not working.
Testing
Manually tested.
Risk
Low. Only moving the try catch.