Skip to content

Commit

Permalink
add ability to change working directory at start of debug session
Browse files Browse the repository at this point in the history
  • Loading branch information
alextremblay committed Nov 7, 2022
1 parent f7261c9 commit dc08b41
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions projects/core/uoft_core/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ def cli():
)
args = p.get_string("args", "Enter any arguments you'd like to pass to the module", default_from_history=True)
sys.argv.extend(args.split())
cd = p.get_path("cwd", "Enter the working directory you'd like to use", default_from_history=True, only_directories=True)
os.chdir(cd)
mod = import_module(mod_name)
if hasattr(mod, "_debug"):
mod._debug() # pylint: disable=protected-access
Expand Down

0 comments on commit dc08b41

Please sign in to comment.