Skip to content

Commit

Permalink
[debug-] turn off progress meter in debug mode
Browse files Browse the repository at this point in the history
breakpoint() is commonly used while debugging, and it does not play well
with the progress meter
  • Loading branch information
anjakefala committed Oct 23, 2023
1 parent 2ab3a9a commit 8103fde
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dev/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ for i in $TESTS ; do
if $TEST == true;
then
for goldfn in tests/golden/${outbase%.vd*}.*; do
PYTHONPATH=. bin/vd --confirm-overwrite=False --play "$i" --batch --output "$goldfn" --config tests/.visidatarc --visidata-dir tests/.visidata
PYTHONPATH=. bin/vd --debug --confirm-overwrite=False --play "$i" --batch --output "$goldfn" --config tests/.visidatarc --visidata-dir tests/.visidata
echo "save: $goldfn"
done
fi
Expand Down
3 changes: 2 additions & 1 deletion visidata/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,8 @@ def main_vd():
vs = eval_vd(vdfile, *fmtargs, **fmtkwargs)
vd.sync(vs.reload())
if args.batch:
vd.outputProgressThread = visidata.VisiData.execAsync(vd, vd.outputProgressEvery, vs, seconds=0.5, sheet=BaseSheet()) #1182
if not args.debug:
vd.outputProgressThread = visidata.VisiData.execAsync(vd, vd.outputProgressEvery, vs, seconds=0.5, sheet=BaseSheet()) #1182
if vd.replay_sync(vs): # error
return 1

Expand Down

0 comments on commit 8103fde

Please sign in to comment.