Function breakpoints should be sorted before enabling then since the object enumeration order does not grant consistent result.
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
- Added pylint and python-serial to apt-get-install-deps.sh.
- Make Jerry debugger import python serial module only if needed.
- Check-pylint.sh warns if pylint isn't installed.
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác oszi@inf.u-szeged.hu
Currently it evaluates the given expression in the context of the top most stack frame.
The expression should access to any variables and arguments that are in the scope chain.
Implement the eval_at request with the level of the scope chain as a further argument.
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
It supports to list the scope chain of the current execution context and see
which variables are available.
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
- Properly handle logging during transport close
- Properly display data during parse
Furthermore hide global functions of the debugger.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
Replace DisplayData to DebuggerAction. The new class has only four type
options. Furthermore several functions returning with DisplayData is
changed to return with string.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
The documentation has not been updated when the HTML client got
removed nor when the new transport layer replaced the previous
debug server initialization process.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This was needed for the VScode extension so we know in total howmany frames we have in the backtrace.
JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
Move DebuggerPrompt to jerry_client.py
Implement JerryDebugger functions in the jerry_client_ws.py file
Server response is displayed by jerry_client.py
JerryScript-DCO-1.0-Signed-off-by: Tamas Zakor ztamas@inf.u-szeged.hu
With this feature the use can restart the actual debug session
(similar to the multiple source context reset) within a client.
JerryScript-DCO-1.0-Signed-off-by: Imre Kiss kissi.szeged@partner.samsung.com
Aborts are not caught by catch/finally blocks,
so it is possible to stop a script using the debugger.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This patch makes it possible to throw an error from the python debugger client using the `throw` command.
JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
With this command the engine continue running just after the function
in the current stack frame returns.
JerryScript-DCO-1.0-Signed-off-by: Imre Kiss kissi.szeged@partner.samsung.com
Make a next command more gdb like.
If an argument is given `next 10`, it does 10 nexts.
JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
Source is now scrollable after writing `scroll`.
Keys are `q` to quit, `w` to scroll up `s` to scroll down.
JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
Before this patch the JS execution is started right after the parsing
is completed. The problem is that some parts of the JS code is executed
before the debugger had any chance to insert pending breakpoints due
to network latency. This patch adds a delay after parsing when at least
one pendding breakpoint is available.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
By adding version information to the debugger protocol
it is possible to report if the debugger client and server
have different expectations on debugger workings (opcodes, types, etc.).
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
There was an issue where pending breakpoints were incorrectly tried to be assigned to files, since they missed the sourcename check. It's also worth mentioning that pending breakpoints were not "moved" correctly to active status, just copied there instead, making them appear in the pending list still.
This patch fixes both of these issues.
JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
- The context reset request message can be sent anytime from a client.
- After the message received the engine will call the cleanup and init
when in the source waiting mode (which means the currently processed file will be executed).
- After the reinitialization is done, the engine will wait
for a new client connection(rest of the work is the client's responsibility).
JerryScript-DCO-1.0-Signed-off-by: Imre Kiss kissi.szeged@partner.samsung.com
Merging the messages to one check, therefore multiple duplicated lines are removed.
I didn't find a good solution though in the HTML client, since it would be nested switch cases / ifs, which wouldn't look okay IMO, the other solution would only save like 2 lines of code overall.
JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
Sending the output to the debugger client, at the moment only the JS side prints are sent over.
JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
Whit this enhancement the debugger can able handle more than one source file across the new source wait mode.
This feature can be used by the python client with the --client-source [paths] switch.
The client will store every source path, when the debugger send a signal about the waiting status, then the client will send one file from the list.
JerryScript-DCO-1.0-Signed-off-by: Imre Kiss kissi.szeged@partner.samsung.com
From now on, jerry_debugger_send_string can send a subtype of the string, making it more simple to send over strings with special parameters, therefore seperating different types of messages are simpler.
Enumerations for various subtypes can be made, while there's only need to have 2 entries for the header type.
JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
Implementing the source command rework - along with display - to the html client too.
JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
With this feature the debugger webIDE and the python client can able to send a source code to the debugger while that is running in wait mode.
This feature can be activated with the --debugger-wait-source switch and the debugger will wait for the source messages.
If every message part are received the debugger will continue the exectuion with the initalized options.
JerryScript-DCO-1.0-Signed-off-by: Imre Kiss kissi.szeged@partner.samsung.com
Adding --color option, highligthing the number of lines, the pointer and the actual breakpoint.
JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
Reworked source(src) command to display a given range of the code, defaults to 3.
Added display command which does the same as the source, except it displays the source code everytime a breakpoint is hit.
Made tests for display, extended tests for src.
JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
Implementation of memstats command in jerry-debugger, python and html client.
Shows the allocated bytes, byte code bytes, string bytes, object bytes, property bytes and heap size.
JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
There was a problem around the offset, the function tried to use some invalid object reference.
JerryScript-DCO-1.0-Signed-off-by: Imre Kiss kissi.szeged@partner.samsung.com
- Support to add pending breakpoints
- Add fbreak command for the prompt
- Manage this breakpoints
- Add tests for it
JerryScript-DCO-1.0-Signed-off-by: Levente Orban orbanl@inf.u-szeged.hu