# How to debug elm app with ports? (elm reactor)

**URL:** <https://discourse.elm-lang.org/t/how-to-debug-elm-app-with-ports-elm-reactor/10426>\
**Category:** Learn\
**Created:** [September 1, 2025, 7:48am UTC](https://discourse.elm-lang.org/t/how-to-debug-elm-app-with-ports-elm-reactor/10426 "2025-09-01T07:48:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PPz](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/ppz/32/5484_2.png) [@PPz](https://discourse.elm-lang.org/u/PPz)\
**Post date:** [September 1, 2025, 7:48am UTC](https://discourse.elm-lang.org/t/how-to-debug-elm-app-with-ports-elm-reactor/10426/1 "2025-09-01T07:48:11Z")

</div>

Sorry, I’m new to elm. This might be a stupid question.

I know I can use `elm reactor` when writing elm app. But ports is in JavaScript code.

* * *

The following are the details:

I have a speech synthesizing service in JS. The sdk is large. So I don’t wait for sdk to load. I just `Elm.Main.init` the app, and load the sdk in `defer script`. Just show the UI before the sdk loaded. But I must notify the elm part after the sdk loaded.

So the entire app depends on the notifying port. If the `elm reactor` don’t support html or js, how to debug port functions?

---

<div class="post-metadata">

**Author:** ![lucamug](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/lucamug/32/1764_2.png) [@lucamug](https://discourse.elm-lang.org/u/lucamug)\
**Post date:** [September 1, 2025, 8:14am UTC](https://discourse.elm-lang.org/t/how-to-debug-elm-app-with-ports-elm-reactor/10426/2 "2025-09-01T08:14:26Z")

</div>

Hi @PPz ,

Welcome to the Elm community,

`elm reactor` is made for simple applications and has limitations. Not being able to add custom JS is one of them.

You may need to look at other solutions, [Home | elm-watch](https://lydell.github.io/elm-watch/) for example.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/elm_lang/original/1X/50a05e53677a2c3b47776d7abd0f113eb50193a1.png) [@system](https://discourse.elm-lang.org/u/system)\
**Post date:** [September 11, 2025, 8:14am UTC](https://discourse.elm-lang.org/t/how-to-debug-elm-app-with-ports-elm-reactor/10426/3 "2025-09-11T08:14:30Z")

</div>

Closed on September 11, 2025, 8:14am UTC

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
