Skip to content

How to set up debugging for mocha tests

Christopher Keith edited this page Jan 24, 2023 · 7 revisions

Notes

  • Dependent on this code: https://github.com/usdigitalresponse/usdr-gost/pull/854
  • May not work in Docker environment yet.

Instructions

  • Install the Mocha Test Explorer extension in VSCode
  • image
  • Open the Testing panel
  • image
  • Hit the "debug" icon to debug tests. Under the hood, this will run the debug target that is listed in launch.json, which runs the relevant task in tasks.json. In turn, this runs the scripts in mocha_setup