debugging Blazor WASM应用程序中VS 2022 for Mac的断点处于非活动状态

ars1skjm  于 2022-11-24  发布在  Mac
关注(0)|答案(1)|浏览(154)

我正在为Mac开发VS 22中的Blazor WASM应用程序。我可以构建它并在调试模式下运行它,程序构建和运行都很好。我使用razor.cs的razor前端页面作为后面的代码。我在razor.cs页面中设置了一些断点,它们保持开放的圆圈,不会被击中。我检查了一下我是否处于调试模式,等等。我启用了详细日志记录,这被记录到终端...

[14:43:46] fail: DevToolsProxy[0]
      failed: Microsoft.WebAssembly.Diagnostics.DebuggerAgentException: SendDebuggerAgentCommand failed for GetMethodFromToken: [Result: IsOk: False, IsErr: True, Value: , Error: {
        "result": {
          "type": "object",
          "subtype": "error",
          "className": "ReferenceError",
          "description": "ReferenceError: getDotnetRuntime is not defined\n    at <anonymous>:1:1",
          "objectId": "8838028629078804716.1.3"
        },
        "exceptionDetails": {
          "exceptionId": 2,
          "text": "Uncaught",
          "lineNumber": 0,
          "columnNumber": 0,
          "scriptId": "7",
          "stackTrace": {
            "callFrames": [
              {
                "functionName": "",
                "scriptId": "7",
                "url": "",
                "lineNumber": 0,
                "columnNumber": 0
              }
            ]
          },
          "exception": {
            "type": "object",
            "subtype": "error",
            "className": "ReferenceError",
            "description": "ReferenceError: getDotnetRuntime is not defined\n    at <anonymous>:1:1",
            "objectId": "8838028629078804716.1.4"
          }
        }
      } ]
         at Microsoft.WebAssembly.Diagnostics.MonoSDBHelper.SendDebuggerAgentCommand[T](T command, MonoBinaryWriter arguments, CancellationToken token, Boolean throwOnError)
         at Microsoft.WebAssembly.Diagnostics.MonoSDBHelper.GetMethodIdByToken(Int32 assembly_id, Int32 method_token, CancellationToken token)
         at Microsoft.WebAssembly.Diagnostics.MonoProxy.SetMonoBreakpoint(SessionId sessionId, String reqId, SourceLocation location, String condition, CancellationToken token)
         at Microsoft.WebAssembly.Diagnostics.MonoProxy.SetBreakpoint(SessionId sessionId, DebugStore store, BreakpointRequest req, Boolean sendResolvedEvent, Boolean fromEnC, CancellationToken token)
         at Microsoft.WebAssembly.Diagnostics.MonoProxy.OnSourceFileAdded(SessionId sessionId, SourceFile source, ExecutionContext context, CancellationToken token)
         at Microsoft.WebAssembly.Diagnostics.MonoProxy.LoadStore(SessionId sessionId, Boolean tryUseDebuggerProtocol, CancellationToken token)
         at Microsoft.WebAssembly.Diagnostics.MonoProxy.LoadStore(SessionId sessionId, Boolean tryUseDebuggerProtocol, CancellationToken token)

我一直无法在网上找到任何信息来解决。

cotxawn7

cotxawn71#

您使用的是什么浏览器?
在VS for Mac中调试Blazor Wasm应用程序只对我在Chrome和Safari上有效。

相关问题