You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calls to CallDevToolsProtocolMethodAsync() are impossible to debug because if ANYTHING goes wrong, it just throws an ArgumentException with its default message instead of relaying the dev tools protocol error in the message.
When you call the methods in the browser dev tools, it shows actual error messages, i.e:
When you call CallDevToolsProtocolMethodAsync() it throws ArgumentException with the same "Value does not fall within the expected range" message regardless of whether the dev tools method name was not found, or the method parameter was missing a required value, or a parameter value was the wrong type, or if an exception happened while it was executing like some of the examples above...etc.
Shouldn't the error message be passed along to the exception? The error code should probably also be passed along so that tools can handle different errors accordingly.
mikernet
changed the title
Sensible error messages for CallDevToolsMethodAsync() exceptions
Sensible error messages for CallDevToolsProtocolMethodAsync() exceptions
Aug 5, 2021
Thanks for this feature request @mikernet - I've added it to our backlog. This could definitely be improved and should return the actual error messages from the calls.
We just checked in a fix to have "result" be populated with the error details. This should be available on runtimes 105.0.1315.0+ if you want to try it. Thanks!
Calls to
CallDevToolsProtocolMethodAsync()
are impossible to debug because if ANYTHING goes wrong, it just throws anArgumentException
with its default message instead of relaying the dev tools protocol error in the message.When you call the methods in the browser dev tools, it shows actual error messages, i.e:
When you call
CallDevToolsProtocolMethodAsync()
it throwsArgumentException
with the same "Value does not fall within the expected range" message regardless of whether the dev tools method name was not found, or the method parameter was missing a required value, or a parameter value was the wrong type, or if an exception happened while it was executing like some of the examples above...etc.Shouldn't the error message be passed along to the exception? The error code should probably also be passed along so that tools can handle different errors accordingly.
AB#35187011
The text was updated successfully, but these errors were encountered: