There is a PR for that already, but it has not yet been merged: https://github.com/elm/compiler/pull/1850
At CurrySoftware we run a fork of the Elm compiler which merges this PR and has a feature to use ports and the debugger with `elm reactor`: https://github.com/CurrySoftware/compiler
And an example how to use it here: https://github.com/CurrySoftware/elm-reactor-example