ajaxorg/lib-v8debug — Issue #2: Unexpected token ILLEGAL while debugging
Author: kuebk
Created: 2012-02-04 11:45:40+00:00
State: open

Seems like there is a problem in communication between V8 debugger and this "debugger".
The problem occurs because v8 gives content-length which javascript handles probably in wrong way.

How to replicate (what i've done) using Cloud9 IDE:
1. create an empty dir
2. npm install libyaml
3 create test.js and put into it: https://gist.github.com/8fe77f9681cf8385e943
4. create a breakpoint at 3rd line
5. click debug

The output on console is: https://gist.github.com/d71858633edbbd6d1b8e

Looks like V8 sends something like: https://gist.github.com/6e7a1cdd0eb8d62fc7f2 but the MessageReader thinks it is: https://gist.github.com/b70e70209aa79dd8a9f8 (notice the trailing C in the 2nd link).
I think its because there is C (a copyright special character) which V8 counts as 2 but JS counts as 1.

What you think?
If I made something unclear let me know please.