microsoft / vscode-apimanagement

VS Code extension for Azure API Management.
MIT License
60 stars 40 forks source link

Policy debugging always fail with 401 error #364

Open KijoKim76 opened 2 weeks ago

KijoKim76 commented 2 weeks ago

Any insight?

Error logs:

From client: initialize({"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"apim-policy","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true,"supportsArgsCanBeInterpretedByShell":true,"supportsMemoryEvent":true,"supportsStartDebuggingRequest":true}) To client: {"seq":0,"type":"response","request_seq":1,"command":"initialize","success":true,"body":{"supportsConfigurationDoneRequest":true,"supportsRestartRequest":false,"supportsRestartFrame":false}} From client: launch({"type":"apim-policy","request":"launch","name":"Attach to APIM","stopOnEntry":true,"gatewayAddress":"wss://aipm-epso-authtest01.azure-api.net/debug-0123456789abcdef","managementAddress":"https://management.azure.com//subscriptions/e0ba1ef1-afb6-4f98-9d74-a71e310bae84/resourceGroups/epso-apimauth-test-rg/providers/microsoft.apimanagement/service/aipm-epso-authtest01","subscriptionId":"e0ba1ef1-afb6-4f98-9d74-a71e310bae84","operationData":"GET https://aipm-epso-authtest01.azure-api.net/demo/topics HTTP/1.1\nOcp-Apim-Subscription-Key: xxxxxx\nOcp-Apim-Debug: xxxxxx\nOcp-Apim-Trace: true\n","fileName":"aipm-epso-authtest01-demo-conference-api-GetTopics.http","__sessionId":"206d4c9a-0b26-4464-a081-a09851634617"}) To client: {"seq":0,"type":"event","event":"output","body":{"category":"stderr","output":"Can't connect to gateway: Unexpected server response: 401."}} Can't connect to gateway: Unexpected server response: 401. To client: {"seq":0,"type":"event","event":"terminated"} From client: disconnect({"restart":false}) To client: {"seq":0,"type":"response","request_seq":3,"command":"disconnect","success":true}