The easiest way to add provided dependencies to debug a task with IntelliJ is to:
Right-click src/main/scala
Select Mark Directory as... > Test Sources Root
This tells IntelliJ to treat src/main/scala as a test folder for which it adds all the dependencies tagged as provided to any run config (debug/run).
Every time you do a SBT refresh, redo these step as IntelliJ will reset the folder to a regular source folder.
From stackover: https://stackoverflow.com/questions/36437814/how-to-work-efficiently-with-sbt-spark-and-provided-dependencies
Right-click src/main/scala
Select Mark Directory as... > Test Sources Root
This tells IntelliJ to treat src/main/scala as a test folder for which it adds all the dependencies tagged as provided to any run config (debug/run).
Every time you do a SBT refresh, redo these step as IntelliJ will reset the folder to a regular source folder.
From stackover: https://stackoverflow.com/questions/36437814/how-to-work-efficiently-with-sbt-spark-and-provided-dependencies