mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
add PikaDebug
This commit is contained in:
parent
92dd8379d2
commit
e4363d03a2
5
package/PikaDebug/PikaDebug.py
Normal file
5
package/PikaDebug/PikaDebug.py
Normal file
@ -0,0 +1,5 @@
|
||||
from PikaObj import *
|
||||
|
||||
class Debuger(TinyObj):
|
||||
def set_trace():
|
||||
pass
|
17
package/PikaDebug/PikaDebuger_Debuger.c
Normal file
17
package/PikaDebug/PikaDebuger_Debuger.c
Normal file
@ -0,0 +1,17 @@
|
||||
#include "PikaDebug_Debuger.h"
|
||||
|
||||
static enum shell_state __obj_shellLineHandler_obj_run(PikaObj *self, char *input_line){
|
||||
/* exit */
|
||||
if (strEqu("exit()", input_line)) {
|
||||
/* exit pika shell */
|
||||
return SHELL_STATE_EXIT;
|
||||
}
|
||||
/* run single line */
|
||||
obj_run(self, input_line);
|
||||
return SHELL_STATE_CONTINUE;
|
||||
}
|
||||
|
||||
extern PikaObj* __pikaMain;
|
||||
void PikaDebug_Debuger_set_trace(PikaObj* self) {
|
||||
obj_shellLineProcess(__pikaMain, __obj_shellLineHandler_obj_run);
|
||||
}
|
3
port/linux/.vscode/settings.json
vendored
3
port/linux/.vscode/settings.json
vendored
@ -26,7 +26,8 @@
|
||||
"pikaconfigvalid.h": "c",
|
||||
"*.cfg": "c",
|
||||
"pikastdtask_task.h": "c",
|
||||
"gtesttask_task.h": "c"
|
||||
"gtesttask_task.h": "c",
|
||||
"pikadebug_debuger.h": "c"
|
||||
},
|
||||
"python.formatting.provider": "autopep8"
|
||||
}
|
5
port/linux/package/pikascript/PikaDebug.py
Normal file
5
port/linux/package/pikascript/PikaDebug.py
Normal file
@ -0,0 +1,5 @@
|
||||
from PikaObj import *
|
||||
|
||||
class Debuger(TinyObj):
|
||||
def set_trace():
|
||||
pass
|
@ -3,16 +3,14 @@ import PikaStdDevice
|
||||
import PikaStdData
|
||||
import GTestTask
|
||||
import PikaMath
|
||||
import PikaDebug
|
||||
from PikaObj import *
|
||||
|
||||
pkdb = PikaDebug.Debuger()
|
||||
|
||||
def fun(a,b,c,d,e):
|
||||
print(a)
|
||||
print(b)
|
||||
print(c)
|
||||
print(d)
|
||||
print(e)
|
||||
# i = 0
|
||||
# while i < 10:
|
||||
# i = i + 1
|
||||
# print('i :' + str(i))
|
||||
# pkdb.set_trace()
|
||||
|
||||
fun(10,20,30,40, 'xxx')
|
||||
# while True:
|
||||
# pass
|
||||
|
@ -0,0 +1,17 @@
|
||||
#include "PikaDebug_Debuger.h"
|
||||
|
||||
static enum shell_state __obj_shellLineHandler_obj_run(PikaObj *self, char *input_line){
|
||||
/* exit */
|
||||
if (strEqu("exit()", input_line)) {
|
||||
/* exit pika shell */
|
||||
return SHELL_STATE_EXIT;
|
||||
}
|
||||
/* run single line */
|
||||
obj_run(self, input_line);
|
||||
return SHELL_STATE_CONTINUE;
|
||||
}
|
||||
|
||||
extern PikaObj* __pikaMain;
|
||||
void PikaDebug_Debuger_set_trace(PikaObj* self) {
|
||||
obj_shellLineProcess(__pikaMain, __obj_shellLineHandler_obj_run);
|
||||
}
|
@ -2,4 +2,5 @@ pkg=$1
|
||||
cp package/pikascript/pikascript-lib/$pkg ../../package/ -r
|
||||
cp package/pikascript/$pkg.py ../../package/$pkg/
|
||||
git add package/pikascript/pikascript-lib/$pkg
|
||||
git add package/pikascript/$pkg.py
|
||||
git add ../../package/$pkg
|
||||
|
Loading…
x
Reference in New Issue
Block a user