title: Elm Port doesn't run
body: <p>I'm trying to fetch a json from an url and parse it in elm, following the <a href="http://elm-lang.org/guide/reactivity" rel="nofollow">Reactivity tutorial</a>. But for some reason my code doesn't do anything. I'm using Debug.watch to see if anything happens.</p>
  
  <p>I have the following code:</p>
  
  <pre><code>emailUrl : String
  emailUrl = some url
  
  port fetchEmails : Task Http.Error ()
  port fetchEmails =
    Http.getString (Debug.watch "url" emailUrl) `andThen` parseEmails
  
  parseEmails : String -&gt; Task x ()
  parseEmails json =
    let result = Json.Decode.decodeString Static.emailDecoder json
    in case result of
      ...
  </code></pre>
  
  <p>The code compiles, but doesn't seem to do anything. I'm very new to elm, so I'm a bit stuck here. How should this work?</p>
  
  <p>Edit: turns out it was working, but as the answer stated the Debug.watch does not work with ports yet. I was also getting a 'cross-origin request blocked', which explains why it couldn't get the json.</p>
  
  <p>Thanks!</p>