I'm running a small Scotty Example with Haskell. The editor I use is VsCode with the haskell language server. I use Stack as build tool for the Haskell project. The problem occurs when I stop the debug session, then there is a timout after 2000ms for 'terminate'
warning in VsCode and ghci-dap isn't closing. I have to force quit the debugger in VsCode, but then I can't restart the debugging because the port is still occupied. When typing sudo lsof -i:3000
in the cli I can still see ghci-dap listening on port 3000. Why isn't it shutting down by itself? And why this timout 2000ms warning when closing debug?
My operating system is Ubuntu 20.04 GHCI version: 9.2.5
The example code:
{-# LANGUAGE OverloadedStrings #-}
import Web.Scotty (scotty, post)
import Control.Monad.IO.Class
main :: IO ()
main = scotty 3000 $ do
get "/" $ do
liftIO $ putStrLn "helloworld"