debugpy/ptvsd/debugger.py
Don Jayamanne 7319b0a3e4
Default host name to 127.0.0.1 when launching the debugger via debug function (#297)
* Fixes #292
* pass host name
* fix code review comment
2018-04-03 16:07:59 -07:00

21 lines
594 B
Python

# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE in the project root
# for license information.
from ptvsd.__main__ import run_module, run_file
__author__ = "Microsoft Corporation <ptvshelp@microsoft.com>"
__version__ = "4.0.0a5"
# TODO: not needed?
DONT_DEBUG = []
def debug(filename, port_num, debug_id, debug_options, run_as, **kwargs):
# TODO: docstring
address = ('localhost', port_num)
if run_as == 'module':
run_module(address, filename, **kwargs)
else:
run_file(address, filename, **kwargs)