diff --git a/lldb/source/Plugins/Platform/WebAssembly/PlatformWebInspectorWasm.cpp b/lldb/source/Plugins/Platform/WebAssembly/PlatformWebInspectorWasm.cpp index fc60a98f46862..c23647f204692 100644 --- a/lldb/source/Plugins/Platform/WebAssembly/PlatformWebInspectorWasm.cpp +++ b/lldb/source/Plugins/Platform/WebAssembly/PlatformWebInspectorWasm.cpp @@ -30,6 +30,13 @@ static constexpr llvm::StringLiteral kServerBinary = static constexpr uint8_t kConnectAttempts = 5; static constexpr auto kConnectDelay = std::chrono::milliseconds(100); +PlatformWebInspectorWasm::PlatformWebInspectorWasm() { + if (llvm::Error err = EnsureConnected()) { + LLDB_LOG_ERROR(GetLog(LLDBLog::Platform), std::move(err), + "EnsureConnected failed: {0}"); + } +} + llvm::StringRef PlatformWebInspectorWasm::GetPluginDescriptionStatic() { return "Platform for debugging Wasm via WebInspector"; } diff --git a/lldb/source/Plugins/Platform/WebAssembly/PlatformWebInspectorWasm.h b/lldb/source/Plugins/Platform/WebAssembly/PlatformWebInspectorWasm.h index 52286b4532ebc..d20308ecfb2f7 100644 --- a/lldb/source/Plugins/Platform/WebAssembly/PlatformWebInspectorWasm.h +++ b/lldb/source/Plugins/Platform/WebAssembly/PlatformWebInspectorWasm.h @@ -45,7 +45,7 @@ class PlatformWebInspectorWasm : public PlatformWasm { private: static lldb::PlatformSP CreateInstance(bool force, const ArchSpec *arch); - PlatformWebInspectorWasm() = default; + PlatformWebInspectorWasm(); llvm::Error LaunchPlatformServer(); llvm::Error EnsureConnected();