Skip to content

Commit

Permalink
more logging in headless mode
Browse files Browse the repository at this point in the history
  • Loading branch information
henrypinkard committed Apr 9, 2024
1 parent 1b89e0b commit b36957c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 10 additions & 0 deletions pycromanager/headless.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import atexit
import threading
import types
import os

from pycromanager.acquisition.acq_eng_py.internal.engine import Engine
from pymmcore import CMMCore
Expand Down Expand Up @@ -175,6 +176,15 @@ def start_headless(
java_loc = mm_app_path + "/jre/bin/javaw.exe"
else:
java_loc = "java"
if debug:
logging.main_logger.debug(f'Java location: {java_loc}')
#print classpath
logging.main_logger.debug(f'Classpath: {classpath}')
# print stuff in the classpath directory
logging.main_logger.debug('Contents of classpath directory:')
for f in os.listdir(classpath):
logging.main_logger.debug(f)

# This starts Java process and instantiates essential objects (core,
# acquisition engine, ZMQServer)
process = subprocess.Popen(
Expand Down
4 changes: 3 additions & 1 deletion pycromanager/test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ def launch_mm_headless(install_mm):
if "JAVA" in os.environ and sys.platform == "darwin":
java_loc = os.environ["JAVA"]

start_headless(mm_install_dir, config_file, java_loc=java_loc, debug=True)
start_headless(mm_install_dir, config_file, java_loc=java_loc,
buffer_size_mb=128, max_memory_mb=128, # set these low for github actions
debug=True)

yield None

Expand Down

0 comments on commit b36957c

Please sign in to comment.