jerryscript
jerryscript copied to clipboard
when use custom debugger port, how to stop at first line.
I have ported debugger for my emscripten project. when I use python debugger client to connect to my debugger server. it always run to end, and wouldn't stop. and I don't find a c api to do that. so when the debugger is connected, how to stop at first line useing c code.
It automatically does this, no need to specify anything. Do you use jerry_main? If yes, did you pass --start-debug-server
? If you use a custom main, please check this:
https://github.com/jerryscript-project/jerryscript/blob/master/jerry-main/main-utils.c#L256
@zherczeg actually I have checked that code, it would be successful with jerry_debugger_is_connected
function calling. when python client connects to server, it will display no breakpoint error as below. and the jerry_run
will run to end.
Those are pending breakpoints, not normal breakpoints. You need to check whether the following code is successfully executed (reaching line 4693):
https://github.com/jerryscript-project/jerryscript/blob/master/jerry-core/vm/vm.c#L4652
If it is never or incorrectly executed, the debugging is disabled (e.g. because of connection lost).
@lee88688 What's the current status with this issue?
I haven't look detailed. I would finish my work and work on this.