You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 16, 2021. It is now read-only.
The issue is because of a wrong assumption that the parent (debugger) will be ready and listening by the time the debuggee start its execution. Once the debuggee starts, it opens up a socket in one thread and listens for client (debugger) connections, while in the other it goes ahead and triggers the execution of the code in debug mode. The first break point event is indeed triggered from the script, but depends on whether a debugger client is attached or not, this event is either processed or abandoned. While the inline case is reported in AIX, the late attach issue is seen in upstream as well.
The fix is to re-trigger any pending break-point events when the client connects.
Fixed through fc90f8c
Two scenarios:
actual output:
bash-4.2$ ./node debug --debug-brk a.js
< debugger listening on port 5858
connecting... ok
debug>
expected output:
bash-4.2$ ./node debug --debug-brk a.js
< debugger listening on port 5858
connecting... ok
break in a.js:1
1 debugger;
2 var i = 10;
3
debug>
terminal #1:
actual output:
bash-4.2$ ./node --debug-brk a.js
< debugger listening on port 5858
terminal #2:
bash-4.2$ ./node debug --debug-brk a.js
< debugger listening on port 5858
connecting... ok
debug>
expected output in terminal #2:
bash-4.2$ ./node debug --debug-brk a.js
< debugger listening on port 5858
connecting... ok
break in a.js:1
1 debugger;
2 var i = 10;
3
debug>
The text was updated successfully, but these errors were encountered: