예제 #1
0
def run(filename, port_num, run_as, *args, **kwargs):

    ptvsd.log.to_file()
    ptvsd.log.info('run{0!r}', (filename, port_num, run_as))

    address = (LOCALHOST, port_num)
    run_main(address, filename, run_as, *args, **kwargs)
예제 #2
0
파일: __main__.py 프로젝트: mtslzr/dotfiles
def handle_args(addr, name, kind, extra=(), nodebug=False, **kwargs):
    if kind == 'pid':
        attach_main(addr, name, *extra, **kwargs)
    elif nodebug:
        run_main(addr, name, kind, *extra, **kwargs)
    else:
        debug_main(addr, name, kind, *extra, **kwargs)
예제 #3
0
def handle_args(addr, name, kind, extra=(), nodebug=False, **kwargs):
    if kind == 'pid':
        attach_main(addr, name, *extra, **kwargs)
    elif nodebug:
        run_main(addr, name, kind, *extra, **kwargs)
    else:
        debug_main(addr, name, kind, *extra, **kwargs)
예제 #4
0
파일: debugger.py 프로젝트: ku5ic/dotfiles
def run(filename, port_num, run_as,
        *args, **kwargs):

    ptvsd.log.to_file()
    ptvsd.log.info('run{0!r}', (filename, port_num, run_as))

    address = (LOCALHOST, port_num)
    run_main(address, filename, run_as, *args, **kwargs)
예제 #5
0
    def test_nodebug_module_no_args(self):
        addr = Address.as_server('10.0.1.1', 8888)
        run_main(addr, 'spam.py', 'module',
                 _runner=self._no_debug_runner)

        self.assertEqual(self.argv, ['spam.py'])

        self.assertEqual(self.addr, Address.as_server(*addr))
        self.assertTrue(self.is_module)
        self.assertEqual(self.args, ())
        self.assertEqual(self.kwargs, {})
예제 #6
0
    def test_nodebug_module_args(self):
        addr = (None, 8888)
        args = ('--one', '--two', '--three')
        run_main(addr, 'spam.py', 'module', *args,
                 _runner=self._no_debug_runner)

        self.assertEqual(self.argv, ['spam.py'] + list(args))

        self.assertEqual(self.addr, Address.as_server(*addr))
        self.assertTrue(self.is_module)
        self.assertEqual(self.args, args)
        self.assertEqual(self.kwargs, {})
예제 #7
0
def run(filename, port_num, run_as, *args, **kwargs):
    address = (LOCALHOST, port_num)
    run_main(address, filename, run_as, *args, **kwargs)
예제 #8
0
def main(addr, name, kind, extra=(), nodebug=False, **kwargs):
    if nodebug:
        run_main(addr, name, kind, *extra, **kwargs)
    else:
        debug_main(addr, name, kind, *extra, **kwargs)
예제 #9
0
def run(filename, port_num, run_as,
        *args, **kwargs):
    address = (LOCALHOST, port_num)
    run_main(address, filename, run_as, *args, **kwargs)