Skip to content

Commit

Permalink
feat: enable ag-chain-cosmos Node.js debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Jun 28, 2020
1 parent 9b62335 commit 5779d6e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/cosmic-swingset/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ RUN go mod download

COPY Makefile* *.go ./
COPY app/ app/
COPY bin/ bin/
COPY x/ x/
COPY cmd/ cmd/
COPY lib/*.go lib/
Expand Down
4 changes: 2 additions & 2 deletions packages/cosmic-swingset/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ scenario1-run-chain:
scenario1-run-client:
AG_SOLO_BASEDIR=t7 ve3/bin/ag-setup-solo --webhost=127.0.0.1:$(BASE_PORT)

AGC = ./lib/ag-chain-cosmos
AGC = ./bin/ag-chain-cosmos
AGCH = ag-cosmos-helper
scenario2-setup: all scenario2-setup-nobuild
scenario2-setup-nobuild:
Expand Down Expand Up @@ -173,7 +173,7 @@ compile-gyp:
install: go.sum
go install -v $(MOD_READONLY) $(BUILD_FLAGS) ./cmd/ag-cosmos-helper
bindir="$${GOBIN-$${GOPATH-$$HOME/go}/bin}"; \
ln -sf "$$PWD/lib/ag-chain-cosmos" "$$PWD/bin/ag-nchainz" "$$bindir/"
ln -sf "$$PWD/bin/ag-chain-cosmos" "$$PWD/bin/ag-nchainz" "$$bindir/"

go.sum: go.mod
@echo "--> Ensure dependencies have not been modified"
Expand Down
13 changes: 13 additions & 0 deletions packages/cosmic-swingset/bin/ag-chain-cosmos
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#! /bin/bash
real0=$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")
thisdir=$(cd "$(dirname -- "$real0")" && pwd -P)
nodeFlags=()
while test $# -gt 0; do
case "$1" in
--inspect*) nodeFlags+=( "$1" ) ;;
*) break ;;
esac
shift
done

exec node ${nodeFlags[@]} "$thisdir/../lib/chain-entrypoint.js" ${1+"$@"}
File renamed without changes.

0 comments on commit 5779d6e

Please sign in to comment.