Beispiel #1
0
def sub():
    cs = "my Création exception"  # This is str with utf8 comment => Création§
    print(">>> %s: %s" % (type(cs), cs))
    if sys.version_info.major == 2:
        csu = unicode(cs, "utf_8")
        print(">>> type(csu)=%s" % type(csu))
    else:
        csu = cs
    python_version = sys.version_info[0]
    if sys.argv[1] == 'test_01_settrace':
        value_to_test_in_remote_client = 'set_trace_called'
        if python_version == 2:
            import ikpdb
            ikpdb.set_trace()
        elif python_version == 3:
            import ikp3db
            ikp3db.set_trace()

    elif sys.argv[1] == 'test_02_py37debugger_statement':
        if python_version == 2:
            import ikpdb
            ikpdb.set_trace()
        elif python_version == 3:
            value_to_test_in_remote_client = 'breakpoint_called'
            breakpoint()
Beispiel #2
0
def looping_function():
    loop = 0
    while loop < 10:
        print("loop=%s" % loop)
        time.sleep(0.2)
        loop += 1
    ikpdb.set_trace()
    raise BogoException("Waf")
Beispiel #3
0
def the_function(p_nb_seconds):
    a_var = 18.3
    the_function_local_list = [1, 2, 3, 'cyril']
    a_beast = BigBear()
    print "ga=%s" % ga

    print "Hello World"
    print "Ceci est la ligne avec le point d'arret"
    for loop_idx in range(p_nb_seconds):
        print "hello @ %s seconds" % loop_idx
        time.sleep(1)
        if loop_idx == 6:
            if TEST_SET_TRACE:
                ikpdb.set_trace()  # will break on next line
            pass  # Need this for set_trace()
            a_var = 98.3
            sub_function()
Beispiel #4
0
def the_function(p_nb_seconds):
    a_var = 18.3
    the_function_local_list = [1, 2, 3, (
        'others',
        'me',
    )]
    a_beast = BigBear()
    print "ga=%s" % ga

    print "Hello World"
    print "This is the ligne with a breakpoint"
    for loop_idx in range(p_nb_seconds):
        print "hello @ %s seconds in MainThread" % loop_idx
        time.sleep(1)
        if loop_idx % 3 == 0:
            sub_function()
        if loop_idx == 12:
            if TEST_SET_TRACE:
                ikpdb.set_trace()  # will break on next line
            pass  # Need this for set_trace()
            a_var = 98.3
            sub_function()