Commit graph

33 commits

Author SHA1 Message Date
HyukWoo Park
ebd5a42641 Fix backtrace info within eval code
* collect backtrace info including eval codes

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-05-20 08:44:14 +09:00
HyukWoo Park
ab86e7137c Fix wrong node position in switch statement
* switch statement has the last location in switch block which incurs an index error in BreakPoint insertion
* fix switch statement to have the start position after switch keyword

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2022-04-18 17:13:58 +09:00
Gergo Csizi
4bbd9d6cc6 Add breakpoint at the end of script execution
With --wait-before-exit it can be turned on in the debugger-server or in the debugger-client.

Signed-off-by: Gergo Csizi gergocs@inf.u-szeged.hu
2022-01-18 15:27:35 +09:00
HyukWoo Park
8c51b7c9a6 Fix bugs in debugger
* fix debugger to add breakpoint at the first line
* fix debugger not to insert any breakpoint when compiling dynamic code
* add some assertion code to detect undesirable cases

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
2021-12-03 11:57:22 +09:00
Gergo Csizi
eb509d32bd Fix delete operation in the debugger
The delete operation did not work with breakpoint index.

Signed-off-by: Gergo Csizi gergocs@inf.u-szeged.hu
2021-12-01 17:07:34 +09:00
Gergo Csizi
45675c8b0b Add --command argument for the debugger
--command takes one string which contains commands to be executed at the start of the program.
The commands must be separated with semicolon.

Signed-off-by: Gergo Csizi gergocs@inf.u-szeged.hu
2021-12-01 16:50:16 +09:00
Seonghyun Kim
3e6afe1c50 Improve debugger function
* Implement port option
* Set 'this' value correctly for eval in debugger
* Implement eval without stopping state
* Implement pumpDebuggerEvents function
* Remove useless variable m_thisExpressionIndex in class context information

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2021-11-26 15:11:49 +09:00
Gergo Csizi
ff2c8073b7 Fix crash in debugger
There was a crash in debugger when a not existing variable was printed or evaluated.
This patch will fix this issue.

Signed-off-by: Gergo Csizi gergocs@inf.u-szeged.hu
2021-11-25 14:27:09 +09:00
Zoltan Herczeg
e3b1a9f5e6 Introduce abstract base class for debugger
Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-11-23 10:52:17 +09:00
Gergo Csizi
9f0574a8bd Add p command for the debugger
Signed-off-by: Gergo Csizi gergocs@inf.u-szeged.hu
2021-11-22 10:14:30 +09:00
Zoltan Herczeg
67131c43cd Fix execution resume after setting a breakpoint.
Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-11-15 12:02:37 +09:00
Mate Dabis
a5035c4ad8 Fix argument checking for b (break) command in python debugger
Signed-off-by: Mate Dabis <mdabis@inf.u-szeged.hu>
2021-11-10 14:52:11 +09:00
Zoltan Herczeg
c2ab3e1f3d Implement backtrace recording for Promise.then calls
Furthermore rework detection of recorded backtrace.

Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-10-12 12:32:49 +09:00
Zoltan Herczeg
1dff039743 Implement backtrace recording for the debugger
Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-10-06 11:43:19 +09:00
Zoltan Herczeg
ed55d51384 Support default class constructors in the debugger
These functions have no source code and should be ignored by the debugger

Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-09-03 17:05:32 +09:00
Zoltan Herczeg
ff4d4d593d Add debugger test cases for class fields
Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-08-24 15:26:23 +09:00
Seonghyun Kim
b562c4caf3 Implement BigInt support on debugger
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2020-12-15 12:18:08 +09:00
Robert Fancsik
7bb5428cff Fix catch parse error when the debugger is enabled
Signed-off-by: Robert Fancsik <frobert@inf.u-szeged.hu>
2020-06-16 08:55:45 +09:00
Robert Fancsik
4dfaec7c4a Statement MetaNodes should be early constructed
Since the debugger breakpoint generation requires a continuously increasing series of LOC indices
the statement node infos should be constructed in the beginning of their parsing functions.

Signed-off-by: Robert Fancsik <frobert@inf.u-szeged.hu>
2020-06-11 18:12:46 +09:00
bence gabor kis
3bb4a39e50 able to send multiple source file to debugger server
Signed-off-by: bence gabor kis <kisbg@inf.u-szeged.hu>
2020-06-11 17:54:21 +09:00
Zoltan Herczeg
7a63397e1c Implement getting object properties.
Furthermore extend get scope and get scope variables with state index parameter.

Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-06-09 08:00:29 +09:00
bence gabor kis
26b974addc Adding ExecutionState depth to backtrace info
The new member is needed to Escargot debugger backtrace function

Signed-off-by: bence gabor kis <kisbg@inf.u-szeged.hu>
2020-05-28 17:59:20 +09:00
Robert Fancsik
c85ec4f4a9 Statements LOC info should not be modified when the debugger is enabled
The line info for each breakpoint can be calculated from the LOC index.
This patch resolves the problem, mentioned in #649.

Signed-off-by: Robert Fancsik <frobert@inf.u-szeged.hu>
2020-05-27 17:43:00 +09:00
bence gabor kis
a88023c9c2 Debugger pending breakpoints
Signed-off-by: bence gabor kis <kisbg@inf.u-szeged.hu>
2020-05-22 11:14:33 +09:00
bence gabor kis
e52c7d1b00 Debugger source send by client feature
Signed-off-by: bence gabor kis <kisbg@inf.u-szeged.hu>
2020-05-12 16:57:32 +09:00
Zoltan Herczeg
161899bf56 Implement showing Exceptions.
Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-04-14 19:04:15 +09:00
Zoltan Herczeg
9f347d9f10 Implement finish (step-out) operation in debugger.
Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-04-08 17:35:21 +09:00
Zoltan Herczeg
c3f23240ac Support symbols when getting variables.
Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-04-07 19:25:31 +09:00
bence gabor kis
e31cfeeada Debugger Client print feature
Signed-off-by: bence gabor kis <kisbg@inf.u-szeged.hu>
2020-04-06 21:04:54 +09:00
Zoltan Herczeg
fc1fac7829 Rework backtrace info.
The new code matches better to VSCode.

Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-04-06 18:14:34 +09:00
Zoltan Herczeg
3f63741714 Implement getting property name / value pairs in the debugger.
Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-04-01 21:15:11 +09:00
Zoltan Herczeg
064d1d09b8 Fix debugger support for arrow functions and var/let/const statements.
Declarations with assignment should insert breakpoints, while
declarations without assignment should not.

Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-04-01 15:14:33 +09:00
bence gabor kis
8de35fd707 Add Escargot-Debugger test runner
To use the Escargot Debugger test system.
First the Escargot needs to be build with the -DESCARGOT_DEBUGGER=1 option, then
run the ./tools/run-test.py with the escargot-debugger command

Signed-off-by: bence gabor kis <kisbg@inf.u-szeged.hu>
2020-03-26 18:16:33 +09:00