Thanks to a search alert for CWL keywords, I just found this hack by Daniel Loos for debugging a CWL CommandLineTool or Workflow step from within the software container without having to change the CWL runner. https://gist.github.com/danlooo/56e4e04c4a27ec6649baf4e5d44d5eea
I haven’t tested it, but it looks reasonable. Adapt the inputs to match your step. Swap the DockerRequirement for your own container (that has at least python installed).