Skip to content

Instantly share code, notes, and snippets.

@behrouze
Last active July 24, 2019 14:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save behrouze/dac171ac711b377ce5dece4e8481032d to your computer and use it in GitHub Desktop.
Save behrouze/dac171ac711b377ce5dece4e8481032d to your computer and use it in GitHub Desktop.
Debug VSCode

pré-requis

installer l'extension Chrome pour VSCode

lancer Chrome en mode debug

Linux

/opt/google/chrome/google-chrome --remote-debugging-port=9222 --user-data-dir=XXX

linux ~/.config/google-chrome/Default osx ~/Library/Application Support/Google/Chrome/Default windows

all Chrome (Chromium) CLI arguments

lancer Node ou Nodemon en mode debug

nodemon --inspect=9230 --debug-brk

VSCode conf

config launch.json de VSCode

utiliser les blocs attach pour Chrome (port 9222) et Node en spécifiant les ports pour chacun des nodes (ici 9230).

multi-target

utiliser les blocs mutli-target (compound) pour pouvoir débugger simultanément plusieurs process (1 chrome et X nodes par ex)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment