Skip to content

Commit

Permalink
cli: add a convenience --debug option
Browse files Browse the repository at this point in the history
  • Loading branch information
darwin committed Jan 11, 2020
1 parent 24832fc commit 982214c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/main-launch-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ cd "$ROOT"
JVM_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=127.0.0.1:5005"
export JVM_OPTS

./scripts/main.sh -vv launch --releases "$ROOT/../releases-dev.edn" "$@"
./scripts/main.sh -vv launch --releases "$ROOT/../releases-dev.edn" --debug 9222 "$@"
9 changes: 8 additions & 1 deletion src/main/dirac/main/actions/launch.clj
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,16 @@
verbosity-args (if (= (:verbosity config) "ALL") ["--enable-logging=stderr" "--v=1"])
custom-devtools [(str "--custom-devtools-frontend=" "file://" frontend-dir)]
devtools-experiments ["--enable-devtools-experiments"]
debugger-args (if (:debug config) [(str "--remote-debugging-port=" (:debug config))])
data-dir (if (some? chromium-data-dir) [(str "--user-data-dir=" chromium-data-dir)])
extra-args (chromium/read-chromium-extra-args)
args (concat convenience-args verbosity-args custom-devtools data-dir devtools-experiments extra-args)
args (concat convenience-args
verbosity-args
custom-devtools
data-dir
devtools-experiments
debugger-args
extra-args)
profile (if (some? chromium-data-dir) (str "[with --user-data-dir='" (terminal/style-path chromium-data-dir) "'] "))]
(if-not (:dry-chromium config)
(do
Expand Down
1 change: 1 addition & 0 deletions src/main/dirac/main/cli.clj
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
[nil "--no-profile" "Don't specify any Chromium data dir"]
[nil "--chromium-version VERSION" "Force specific Chromium version, does not ask the binary"]
[nil "--dry-chromium" "Don't spawn Chromium, only print launch command"]
[nil "--debug PORT" "Spawn Chromium with --remote-debugging-port=PORT"]
[nil "--no-playground" "Don't support playground"]
[nil "--releases PATH" "Force alternative releases.edn file, do not check for updates"]
[nil "--releases-url URL" "Force alternative releases.edn url"]])
Expand Down

0 comments on commit 982214c

Please sign in to comment.