Skip to content

Use vscode to debug tango  #571

@SimLif

Description

@SimLif
  • File tree
.
├── components.py
├── config.jsonnet
├── debug.py
  • The agent file called debug.py.
import sys
import runpy
import os

base_path = os.path.dirname(__file__)
os.chdir(base_path)

args = 'python -m tango run config.jsonnet -i components -w ../workspace'


args = args.split()
if args[0] == 'python':
    """pop up the first in the args"""
    args.pop(0)

if args[0] == '-m':
    """pop up the first in the args"""
    args.pop(0)
    fun = runpy.run_module
else:
    fun = runpy.run_path

sys.argv.extend(args[1:])

fun(args[0], run_name='__main__')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions