niceman
niceman

Reputation: 2673

elm debugger says "no watches" when I do have one

I have this simple code:

module Main where
import Debug
import Html exposing (Html,text,select)
import Html.Attributes exposing (id)
import StartApp.Simple as StartApp
main : Signal Html
main=
    StartApp.start {model=0,update=update,view=view}
type Action=
    Noop
update : Action -> Int -> Int
update a i =
    case a of
        Noop -> i
view : Signal.Address Action -> Int -> Html
view a i=
    select [id "list"] (Debug.watch "options" viewoptions)

options : List String
options=["ahmad","batoul","hello"]
viewoptions : List Html
viewoptions=
    List.map text options

I need to see the value of viewoptions , when I launch elm-reactor and go to 0.0.0.0:8000, I go to my file(main.elm) and press the wrench , after that I get "No watches found" and suggests me to use Debug.watch or Debug.watchsumary.

I looked in the examples in this page and they work, So why doesn't mine ?

Upvotes: 1

Views: 106

Answers (1)

Chad Gilbert
Chad Gilbert

Reputation: 36375

At the moment, there are open bugs with elm-reactor when dealing with ports which make debug watching with StartApp fail. There is an open issue here.

Upvotes: 1

Related Questions