Compound debug configurations

Often you need to run multiple processes at once, but debug them as if they were the same project. A common scenario for this is running a React, Angular or Vue app, along with some sort of API service using Express or Hapi. VS Code has a feature called "Compound Launch Configurations" that allow you to launch multiple debug processes at one.

  • Open "4-compound-launch-config"

  • Start the frontend application

  • Create two launch configs..

    • One for the Node process that runs in the "/server" folder

    • One of the Chrome process that runs from the root

  • Create a compound launch config that includes both of the above configs

  • Run the compound launch config

  • Add a breakpoint to "src/App.js"

  • Add a breakpoint to "server/routes/index.js"

  • Hit both the breakpoints

Last updated