File: _debugger_case_wrong_bytecode.py

package info (click to toggle)
pydevd 2.9.5%2Bds-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 10,880 kB
  • sloc: python: 75,138; cpp: 1,851; sh: 310; makefile: 40; ansic: 4
file content (47 lines) | stat: -rw-r--r-- 938 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import helper
import sys
import helper
import helper
import helper
import helper
from helper import helper as sa
from helper.helper.helper import NULL
from helper.helper import NULL

Base = NULL()

def MyFunction():
	pass

class MyClassA(object):
	__tablename__ = 'tableA'
	n = sa.NULL(sa.NULL, primary_key=True)

class MyClassB(object):
	__tablename__ = 'tableB'
	n = sa.NULL(sa.NULL, primary_key=True)

class MyClassC(object):
	def __init__(self):
		pass

class MyClassD(object):
	def __init__(self):
		pass

if __name__ == "__main__":
	N = len(sys.argv)  # break here

	if N >= 2: # step 1
		arg1 = sys.argv[1]  # the debugger gets here even though N=1
		print(arg1)
	else:
		arg1 = 'MyString' # step 2

	if N >= 3: # step 3
		arg2 = int(sys.argv[2])  # the debugger gets here even though N=1
	else:
		arg2 = int(0) # step 4

	print(N)  # still N=1 step 5
	# print(arg1)  # if you print this then it changes the debugger behavior above