Skip to content

Commit bf6bf02

Browse files
committed
check LiveDebuggerWeb prefix
1 parent 827ce55 commit bf6bf02

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

lib/live_debugger/services/module_discovery_service.ex

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@ defmodule LiveDebugger.Services.ModuleDiscoveryService do
5757
defp debugger?(module) do
5858
stringified_module = Atom.to_string(module)
5959

60-
String.starts_with?(stringified_module, "LiveDebugger.") or
61-
String.starts_with?(stringified_module, "Elixir.LiveDebugger.")
60+
String.starts_with?(stringified_module, [
61+
"Elixir.LiveDebugger.",
62+
"Elixir.LiveDebuggerWeb.",
63+
"LiveDebugger.",
64+
"LiveDebuggerWeb."
65+
])
6266
end
6367
end

test/services/live_view_discovery_service_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ defmodule LiveDebugger.Services.LiveViewDiscoveryServiceTest do
3636
debugger_pid = :c.pid(0, 0, 2)
3737

3838
module = :"Elixir.SomeLiveView"
39-
live_debugger_module = :"Elixir.LiveDebugger.Debugger"
39+
live_debugger_module = :"Elixir.LiveDebuggerWeb.Debugger"
4040

4141
MockProcessService
4242
|> expect(:list, fn -> [live_view_pid, debugger_pid] end)
@@ -59,7 +59,7 @@ defmodule LiveDebugger.Services.LiveViewDiscoveryServiceTest do
5959
live_debugger_pid = :c.pid(0, 0, 2)
6060
live_view_pid = :c.pid(0, 0, 1)
6161

62-
live_debugger_module = :"Elixir.LiveDebugger.SomLiveView"
62+
live_debugger_module = :"Elixir.LiveDebuggerWeb.SomLiveView"
6363
live_view_module = :"Elixir.SomeLiveView"
6464

6565
MockProcessService

0 commit comments

Comments
 (0)